[TB] Fix source parameter null error
This commit is contained in:
parent
8b16bd8ee2
commit
99c30bbc4f
1 changed files with 2 additions and 2 deletions
|
|
@ -73,7 +73,7 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
||||||
Progress = (Int64)((torrent.Progress) * 100.0),
|
Progress = (Int64)((torrent.Progress) * 100.0),
|
||||||
Status = torrent.DownloadState,
|
Status = torrent.DownloadState,
|
||||||
Added = ChangeTimeZone(torrent.CreatedAt)!.Value,
|
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)),
|
Path = String.Join("/", m.Name.Split('/').Skip(1)),
|
||||||
Bytes = m.Size,
|
Bytes = m.Size,
|
||||||
|
|
@ -291,7 +291,7 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
||||||
|
|
||||||
var torrentId = await GetClient().Torrents.GetHashInfoAsync(torrent.Hash, skipCache: true);
|
var torrentId = await GetClient().Torrents.GetHashInfoAsync(torrent.Hash, skipCache: true);
|
||||||
|
|
||||||
foreach (var file in torrent.Files!)
|
foreach (var file in torrent.Files)
|
||||||
{
|
{
|
||||||
var newFile = $"https://torbox.app/fakedl/{torrentId?.Id}/{file.Id}";
|
var newFile = $"https://torbox.app/fakedl/{torrentId?.Id}/{file.Id}";
|
||||||
files.Add(newFile);
|
files.Add(newFile);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue