Refactored out merge pattern for more readable syntax.

This commit is contained in:
Roger Far 2025-01-19 19:57:39 -07:00
parent e449bd7928
commit b8c183c079

View file

@ -209,7 +209,7 @@ public class QBittorrent(ILogger<QBittorrent> logger, Settings settings, Authent
if (!String.IsNullOrWhiteSpace(torrent.RdName))
{
// Alldebrid stores single file torrents at the root folder.
if (torrent is { ClientKind: Torrent.TorrentClientKind.AllDebrid, Files.Count: 1 })
if (torrent.ClientKind == Torrent.TorrentClientKind.AllDebrid && torrent.Files.Count == 1)
{
torrentPath = Path.Combine(downloadPath, torrent.Files[0].Path);
} else