remove empty creds restriction (#10)
* removed empty checks on qbit and deluge credentials * updated configuration readme
This commit is contained in:
@@ -23,10 +23,5 @@ public sealed record DelugeConfig : IConfig
|
||||
{
|
||||
throw new ArgumentNullException(nameof(Url));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(Password))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(Password));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,15 +25,5 @@ public sealed class QBitConfig : IConfig
|
||||
{
|
||||
throw new ArgumentNullException(nameof(Url));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(Username))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(Username));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(Password))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(Password));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,11 @@ public sealed class QBitService : IDownloadService
|
||||
|
||||
public async Task LoginAsync()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_config.Username) && string.IsNullOrEmpty(_config.Password))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await _client.LoginAsync(_config.Username, _config.Password);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user