[TB] use torrentClientTorrent (if it's passed) instead of fetching in UpdateData

Makes `ProviderUpdater` only cause 2 API requests each run rather than `O(n)` where `n` is the number of torrents
This commit is contained in:
Cucumberrbob 2025-03-17 20:23:05 +00:00
parent aa6e6c7df5
commit ab5a013edb
No known key found for this signature in database
GPG key ID: 2B935C47401C3614

View file

@ -206,7 +206,7 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
return torrent;
}
var rdTorrent = await GetInfo(torrent.Hash) ?? throw new($"Resource not found");
var rdTorrent = torrentClientTorrent ?? await GetInfo(torrent.Hash) ?? throw new($"Resource not found");
if (!String.IsNullOrWhiteSpace(rdTorrent.Filename))
{