Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 75492a5792 | |||
| 5ca717d7e0 | |||
| 7068ee5e5a | |||
| 9f770473e5 |
@@ -95,7 +95,7 @@ I've seen a few discussions on this type of naming and I've decided that I didn'
|
|||||||
- If it is, the item receives a **strike** and will continue to accumulate strikes every time it meets any of these conditions.
|
- If it is, the item receives a **strike** and will continue to accumulate strikes every time it meets any of these conditions.
|
||||||
- Check each queue item if it meets one of the following condition in the download client:
|
- Check each queue item if it meets one of the following condition in the download client:
|
||||||
- **Marked as completed, but 0 bytes have been downloaded** (due to files being blocked by qBittorrent or the **content blocker**).
|
- **Marked as completed, but 0 bytes have been downloaded** (due to files being blocked by qBittorrent or the **content blocker**).
|
||||||
- All associated files of are marked as **unwanted/skipped**.
|
- All associated files are marked as **unwanted/skipped/do not download**.
|
||||||
- If the item **DOES NOT** match the above criteria, it will be skipped.
|
- If the item **DOES NOT** match the above criteria, it will be skipped.
|
||||||
- If the item **DOES** match the criteria or has received the **maximum number of strikes**:
|
- If the item **DOES** match the criteria or has received the **maximum number of strikes**:
|
||||||
- It will be removed from the *arr's queue and blocked.
|
- It will be removed from the *arr's queue and blocked.
|
||||||
@@ -271,7 +271,21 @@ services:
|
|||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> ### Run as a Windows Service
|
> ### Run as a Windows Service
|
||||||
> Check out this stackoverflow answer on how to do it: https://stackoverflow.com/a/15719678
|
> 1. Download latest nssm build from `https://nssm.cc/builds`.
|
||||||
|
> 2. Unzip `nssm.exe` in `C:\example\directory`.
|
||||||
|
> 3. Open a terminal with Administrator rights and execute these commands:
|
||||||
|
> ```
|
||||||
|
> nssm.exe install Cleanuperr "C:\example\directory\cleanuperr.exe"
|
||||||
|
> nssm.exe set Cleanuperr AppDirectory "C:\example\directory\"
|
||||||
|
> nssm.exe set Cleanuperr AppStdout "C:\example\directory\cleanuperr.log"
|
||||||
|
> nssm.exe set Cleanuperr AppStderr "C:\example\directory\cleanuperr.crash.log"
|
||||||
|
> nssm.exe set Cleanuperr AppRotateFiles 1
|
||||||
|
> nssm.exe set Cleanuperr AppRotateOnline 1
|
||||||
|
> nssm.exe set Cleanuperr AppRotateBytes 10485760
|
||||||
|
> nssm.exe set Cleanuperr AppRotateFiles 10
|
||||||
|
> nssm.exe set Cleanuperr Start SERVICE_AUTO_START
|
||||||
|
> nssm.exe start Cleanuperr
|
||||||
|
> ```
|
||||||
|
|
||||||
### <img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/brands/linux.svg" height="20" style="vertical-align: middle;"> <span style="vertical-align: middle;">Linux</span>
|
### <img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/brands/linux.svg" height="20" style="vertical-align: middle;"> <span style="vertical-align: middle;">Linux</span>
|
||||||
|
|
||||||
|
|||||||
@@ -216,8 +216,6 @@
|
|||||||
*.log
|
*.log
|
||||||
*.loop-vbs
|
*.loop-vbs
|
||||||
*.ls
|
*.ls
|
||||||
*.m3u
|
|
||||||
*.m4a
|
|
||||||
*.mac
|
*.mac
|
||||||
*.macho
|
*.macho
|
||||||
*.mamc
|
*.mamc
|
||||||
@@ -271,7 +269,6 @@
|
|||||||
*.ncl
|
*.ncl
|
||||||
*.net
|
*.net
|
||||||
*.nexe
|
*.nexe
|
||||||
*.nfo
|
|
||||||
*.nrg
|
*.nrg
|
||||||
*.num
|
*.num
|
||||||
*.nzb.bz2
|
*.nzb.bz2
|
||||||
@@ -402,7 +399,6 @@
|
|||||||
*.sql
|
*.sql
|
||||||
*.sqx
|
*.sqx
|
||||||
*.srec
|
*.srec
|
||||||
*.srt
|
|
||||||
*.ssm
|
*.ssm
|
||||||
*.sts
|
*.sts
|
||||||
*.sub
|
*.sub
|
||||||
@@ -514,6 +510,4 @@
|
|||||||
*sample.mp4
|
*sample.mp4
|
||||||
*sample.webm
|
*sample.webm
|
||||||
*sample.wmv
|
*sample.wmv
|
||||||
Trailer.*
|
|
||||||
VOSTFR
|
|
||||||
api
|
api
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FLM.QBittorrent" Version="1.0.0" />
|
<PackageReference Include="FLM.QBittorrent" Version="1.0.0" />
|
||||||
<PackageReference Include="FLM.Transmission" Version="1.0.2" />
|
<PackageReference Include="FLM.Transmission" Version="1.0.3" />
|
||||||
<PackageReference Include="Mapster" Version="7.4.0" />
|
<PackageReference Include="Mapster" Version="7.4.0" />
|
||||||
<PackageReference Include="MassTransit" Version="8.3.6" />
|
<PackageReference Include="MassTransit" Version="8.3.6" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.2" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.2" />
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ public class TransmissionService : DownloadService, ITransmissionService
|
|||||||
{
|
{
|
||||||
private readonly TransmissionConfig _config;
|
private readonly TransmissionConfig _config;
|
||||||
private readonly Client _client;
|
private readonly Client _client;
|
||||||
private TorrentInfo[]? _torrentsCache;
|
|
||||||
|
|
||||||
private static readonly string[] Fields =
|
private static readonly string[] Fields =
|
||||||
[
|
[
|
||||||
@@ -366,30 +365,8 @@ public class TransmissionService : DownloadService, ITransmissionService
|
|||||||
return (await StrikeAndCheckLimit(torrent.HashString!, torrent.Name!, StrikeType.Stalled), DeleteReason.Stalled);
|
return (await StrikeAndCheckLimit(torrent.HashString!, torrent.Name!, StrikeType.Stalled), DeleteReason.Stalled);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<TorrentInfo?> GetTorrentAsync(string hash)
|
private async Task<TorrentInfo?> GetTorrentAsync(string hash) =>
|
||||||
{
|
(await _client.TorrentGetAsync(Fields, hash))
|
||||||
TorrentInfo? torrent = _torrentsCache?
|
?.Torrents
|
||||||
.FirstOrDefault(x => x.HashString.Equals(hash, StringComparison.InvariantCultureIgnoreCase));
|
?.FirstOrDefault();
|
||||||
|
|
||||||
if (_torrentsCache is null || torrent is null)
|
|
||||||
{
|
|
||||||
// refresh cache
|
|
||||||
_torrentsCache = (await _client.TorrentGetAsync(Fields))
|
|
||||||
?.Torrents;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_torrentsCache?.Length is null or 0)
|
|
||||||
{
|
|
||||||
_logger.LogDebug("could not list torrents | {url}", _config.Url);
|
|
||||||
}
|
|
||||||
|
|
||||||
torrent = _torrentsCache?.FirstOrDefault(x => x.HashString.Equals(hash, StringComparison.InvariantCultureIgnoreCase));
|
|
||||||
|
|
||||||
if (torrent is null)
|
|
||||||
{
|
|
||||||
_logger.LogDebug("could not find torrent | {hash} | {url}", hash, _config.Url);
|
|
||||||
}
|
|
||||||
|
|
||||||
return torrent;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user