Merge pull request #625 from asylumexp/fix/torbox-MethodNotAllowed
[TorBox] Fix MethodNotAllowed, source parameter null, preventing download of files
This commit is contained in:
commit
a335ce2bdd
1 changed files with 6 additions and 3 deletions
|
|
@ -73,7 +73,7 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
|||
Progress = (Int64)((torrent.Progress) * 100.0),
|
||||
Status = torrent.DownloadState,
|
||||
Added = ChangeTimeZone(torrent.CreatedAt)!.Value,
|
||||
Files = torrent.Files.Select(m => new TorrentClientFile
|
||||
Files = (torrent.Files ?? []).Select(m => new TorrentClientFile
|
||||
{
|
||||
Path = String.Join("/", m.Name.Split('/').Skip(1)),
|
||||
Bytes = m.Size,
|
||||
|
|
@ -291,8 +291,11 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
|||
|
||||
var torrentId = await GetClient().Torrents.GetHashInfoAsync(torrent.Hash, skipCache: true);
|
||||
|
||||
var newFile = $"https://torbox.app/fakedl/{torrentId?.Id}/zip";
|
||||
files.Add(newFile);
|
||||
foreach (var file in torrent.Files)
|
||||
{
|
||||
var newFile = $"https://torbox.app/fakedl/{torrentId?.Id}/{file.Id}";
|
||||
files.Add(newFile);
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue