[TB] fix: unpacking zip downloads

may have unintended consequences by fixing this as it may now unpack zips in individual file downloads that aren't intended to be unpacked?
This commit is contained in:
Sam Heinz 2025-03-12 23:05:19 +10:00
parent ea9c90552b
commit 10176357e4

View file

@ -447,13 +447,8 @@ public class TorrentRunner(ILogger<TorrentRunner> logger, Torrents torrents, Dow
// Check if the unpacking process is even needed
var uri = new Uri(download.Link);
var fileName = uri.Segments.Last();
fileName = HttpUtility.UrlDecode(fileName);
Log($"Found file name {fileName}", download, torrent);
var extension = Path.GetExtension(fileName);
var extension = Path.GetExtension(download.FileName);
if ((extension != ".rar" && extension != ".zip") ||
torrent.DownloadClient == Data.Enums.DownloadClient.Symlink)