Add extension only for known protocols in ReleaseResource

This commit is contained in:
Bogdan 2023-06-06 21:52:44 +03:00
parent 7c5409383e
commit f7d7cca982

View file

@ -43,14 +43,14 @@ public string FileName
{
get
{
var extension = "torrent";
if (Protocol == DownloadProtocol.Usenet)
var extension = Protocol switch
{
extension = "nzb";
}
DownloadProtocol.Torrent => ".torrent",
DownloadProtocol.Usenet => ".nzb",
_ => string.Empty
};
return $"{Title}.{extension}";
return $"{Title}{extension}";
}
}
}