[TB] Download via zip if file count is over 50
Due to rate limiting issues this is implemented again, it works now since TB reenabled HEAD method for zip downloads on their backend
This commit is contained in:
parent
78daeeeaf3
commit
6afef14855
1 changed files with 10 additions and 2 deletions
|
|
@ -292,11 +292,19 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
|||
|
||||
var torrentId = await GetClient().Torrents.GetHashInfoAsync(torrent.Hash, skipCache: true);
|
||||
|
||||
foreach (var file in torrent.Files)
|
||||
if (torrent.Files.Count >= 50)
|
||||
{
|
||||
var newFile = $"https://torbox.app/fakedl/{torrentId?.Id}/{file.Id}";
|
||||
var newFile = $"https://torbox.app/fakedl/{torrentId?.Id}/zip";
|
||||
files.Add(newFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var file in torrent.Files)
|
||||
{
|
||||
var newFile = $"https://torbox.app/fakedl/{torrentId?.Id}/{file.Id}";
|
||||
files.Add(newFile);
|
||||
}
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue