mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-09-18 17:23:02 -04:00
Fix Transmission torrent fetch (#389)
This commit is contained in:
1 parent
b16fa70774
commit
c07b811cf8
2 files changed
+10
-3
No files matched your search
+1
-1
@@ -8,7 +8,7 @@ namespace Cleanuparr.Infrastructure.Features.DownloadClient.Transmission;
|
||||
/// </summary>
|
||||
public interface ITransmissionClientWrapper
|
||||
{
|
||||
Task<SessionInfo> GetSessionInformationAsync();
|
||||
Task<SessionInfo?> GetSessionInformationAsync();
|
||||
Task<TransmissionTorrents?> TorrentGetAsync(string[] fields, string? hash = null);
|
||||
Task TorrentSetAsync(TorrentSettings settings);
|
||||
Task TorrentSetLocationAsync(long[] ids, string location, bool move);
|
||||
|
||||
+9
-2
@@ -16,11 +16,18 @@ public sealed class TransmissionClientWrapper : ITransmissionClientWrapper
|
||||
_client = client;
|
||||
}
|
||||
|
||||
public Task<SessionInfo> GetSessionInformationAsync()
|
||||
public Task<SessionInfo?> GetSessionInformationAsync()
|
||||
=> _client.GetSessionInformationAsync();
|
||||
|
||||
public Task<TransmissionTorrents?> TorrentGetAsync(string[] fields, string? hash = null)
|
||||
=> _client.TorrentGetAsync(fields, hash);
|
||||
{
|
||||
if (hash is null)
|
||||
{
|
||||
return _client.TorrentGetAsync(fields);
|
||||
}
|
||||
|
||||
return _client.TorrentGetAsync(fields, hash);
|
||||
}
|
||||
|
||||
public Task TorrentSetAsync(TorrentSettings settings)
|
||||
=> _client.TorrentSetAsync(settings);
|
||||
|
||||
Reference in new issue
Block a user