Fix for the removal of the instant availability api for real-debrid
GetAvailableFiles in ReaDebridTorrentClient now returns an empty list.
This commit is contained in:
parent
f33380e77b
commit
e225ae43e4
1 changed files with 8 additions and 18 deletions
|
|
@ -139,19 +139,9 @@ public class RealDebridTorrentClient(ILogger<RealDebridTorrentClient> logger, IH
|
|||
|
||||
public async Task<IList<TorrentClientAvailableFile>> GetAvailableFiles(String hash)
|
||||
{
|
||||
var result = await GetClient().Torrents.GetAvailableFiles(hash);
|
||||
|
||||
var files = result.SelectMany(m => m.Value).SelectMany(m => m.Value).SelectMany(m => m.Values);
|
||||
|
||||
var groups = files.Where(m => m.Filename != null).GroupBy(m => $"{m.Filename}-{m.Filesize}");
|
||||
|
||||
var torrentClientAvailableFiles = groups.Select(m => new TorrentClientAvailableFile
|
||||
{
|
||||
Filename = m.First().Filename!,
|
||||
Filesize = m.First().Filesize
|
||||
}).ToList();
|
||||
|
||||
return torrentClientAvailableFiles;
|
||||
// Real-Debrid has removed there instant availability api, so we are now forced
|
||||
// to return an empty list
|
||||
return await Task.Run(() => new List<TorrentClientAvailableFile>());
|
||||
}
|
||||
|
||||
public async Task SelectFiles(Data.Models.Data.Torrent torrent)
|
||||
|
|
|
|||
Loading…
Reference in a new issue