Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc9573f
commit e66bf5a
Showing
3 changed files
with
26 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
TVRename/ScanActivity/Finders/DownloadingProviderFinder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace TVRename | ||
{ | ||
abstract class DownloadingProviderFinder : DownloadingFinder | ||
{ | ||
private readonly IDownloadProvider source; | ||
protected DownloadingProviderFinder(TVDoc doc, IDownloadProvider source) : base(doc) | ||
{ | ||
this.source = source; | ||
} | ||
protected override string CheckName() => $"Looked in {source.Name()} for the missing files to see if they are being downloaded"; | ||
|
||
protected override void DoCheck(SetProgressDelegate prog, ICollection<ShowItem> showList, TVDoc.ScanSettings settings) | ||
{ | ||
List<TorrentEntry>? downloading = source.GetTorrentDownloads(); | ||
if (downloading is null) | ||
{ | ||
LOGGER.Warn($"Failed to get current downloads from {source.Name()}"); | ||
return; | ||
} | ||
SearchForAppropriateDownloads(downloading, DownloadApp.qBitTorrent, settings); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters