Compare commits

...

2 Commits

Author SHA1 Message Date
Marius Nechifor
54cabd98b4 remove empty creds restriction (#10)
* removed empty checks on qbit and deluge credentials

* updated configuration readme
2024-11-19 23:54:16 +02:00
Marius Nechifor
cbc5c571b3 fixed missing torrent check on content blocker (#9) 2024-11-19 23:23:22 +02:00
5 changed files with 16 additions and 21 deletions

View File

@@ -134,16 +134,16 @@ services:
| CONTENTBLOCKER__BLACKLIST__PATH | Yes if whitelist is enabled | Path to the whitelist (local file or url); Needs to be json compatible | empty |
|||||
| QBITTORRENT__ENABLED | No | Enable or disable qBittorrent | true |
| QBITTORRENT__URL | Yes if qBittorrent is enabled | qBittorrent instance url | http://localhost:8112 |
| QBITTORRENT__USERNAME | Yes if qBittorrent is enabled | qBittorrent user | empty |
| QBITTORRENT__PASSWORD | Yes if qBittorrent is enabled | qBittorrent password | empty |
| QBITTORRENT__URL | No | qBittorrent instance url | http://localhost:8112 |
| QBITTORRENT__USERNAME | No | qBittorrent user | empty |
| QBITTORRENT__PASSWORD | No | qBittorrent password | empty |
|||||
| DELUGE__ENABLED | No | Enable or disable Deluge | false |
| DELUGE__URL | Yes if Deluge is enabled | Deluge instance url | http://localhost:8080 |
| DELUGE__PASSWORD | Yes if Deluge is enabled | Deluge password | empty |
| DELUGE__URL | No | Deluge instance url | http://localhost:8080 |
| DELUGE__PASSWORD | No | Deluge password | empty |
|||||
| TRANSMISSION__ENABLED | No | Enable or disable Transmission | true |
| TRANSMISSION__URL | Yes if Transmission is enabled | Transmission instance url | http://localhost:9091 |
| TRANSMISSION__URL | No | Transmission instance url | http://localhost:9091 |
| TRANSMISSION__USERNAME | No | Transmission user | empty |
| TRANSMISSION__PASSWORD | No | Transmission password | empty |
|||||

View File

@@ -23,10 +23,5 @@ public sealed record DelugeConfig : IConfig
{
throw new ArgumentNullException(nameof(Url));
}
if (string.IsNullOrEmpty(Password))
{
throw new ArgumentNullException(nameof(Password));
}
}
}

View File

@@ -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));
}
}
}

View File

@@ -77,6 +77,11 @@ public sealed class ContentBlocker : IDisposable
{
foreach (QueueRecord record in items)
{
if (record.Protocol is not "torrent")
{
continue;
}
if (string.IsNullOrEmpty(record.DownloadId))
{
_logger.LogDebug("skip | download id is null for {title}", record.Title);

View File

@@ -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);
}