Merge pull request #600 from Ruakij/fix/qbittorrent-api-login-on-authenticationtype-none

Accept login via qbittorrent-api when AuthType is none
This commit is contained in:
Roger Far 2024-11-18 03:25:08 -07:00 committed by GitHub
commit c9c4b4550b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,6 +21,11 @@ public class QBittorrentController(ILogger<QBittorrentController> logger, QBitto
{
logger.LogDebug($"Auth login");
if (Settings.Get.General.AuthenticationType == AuthenticationType.None)
{
return Ok("Ok.");
}
if (String.IsNullOrWhiteSpace(request.UserName) || String.IsNullOrEmpty(request.Password))
{
return Ok("Fails.");