mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-04-16 03:58:37 -04:00
Fix Transmission torrent fetch (#389)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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