Fixed potential error when the qbittorrent API fetched info about a torrent that doesn't have a name yet.
This commit is contained in:
parent
a15a36ccd9
commit
9947a4dc97
1 changed files with 5 additions and 1 deletions
|
|
@ -226,7 +226,11 @@ namespace RdtClient.Service.Services
|
|||
downloadPath = Path.Combine(downloadPath, torrent.Category);
|
||||
}
|
||||
|
||||
var torrentPath = Path.Combine(downloadPath, torrent.RdName) + Path.DirectorySeparatorChar;
|
||||
var torrentPath = downloadPath;
|
||||
if (!String.IsNullOrWhiteSpace(torrent.RdName))
|
||||
{
|
||||
torrentPath = Path.Combine(downloadPath, torrent.RdName) + Path.DirectorySeparatorChar;
|
||||
}
|
||||
|
||||
var bytesDone = torrent.RdProgress;
|
||||
var bytesTotal = torrent.RdSize;
|
||||
|
|
|
|||
Loading…
Reference in a new issue