Url decode the filename, sometimes RD would return a url encoded string, sometimes not.

This commit is contained in:
Roger Far 2021-02-07 21:59:47 -07:00
parent 4a985cc1f4
commit b1c70b723f

View file

@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Web;
using Downloader;
using RdtClient.Data.Models.Data;
using RdtClient.Service.Helpers;
@ -61,6 +62,9 @@ namespace RdtClient.Service.Services
}
var fileName = uri.Segments.Last();
fileName = HttpUtility.UrlDecode(fileName);
var filePath = Path.Combine(torrentPath, fileName);
if (File.Exists(filePath))