Fixed: (FileList) Prevent double query escaping and category IDs correction

pull/3939/head
Bogdan 1 year ago
parent 3ec6a73656
commit 27518a27fb

@ -23,7 +23,10 @@ namespace NzbDrone.Core.Indexers.FileList
{
var pageableRequests = new IndexerPageableRequestChain();
pageableRequests.Add(GetRequest("search-torrents", Settings.Categories, string.Format("&type=name&query={0}+{1}", Uri.EscapeDataString(searchCriteria.CleanArtistQuery.Trim()), Uri.EscapeDataString(searchCriteria.CleanAlbumQuery.Trim()))));
var artistQuery = searchCriteria.CleanArtistQuery.Replace("+", " ").Trim();
var albumQuery = searchCriteria.CleanAlbumQuery.Replace("+", " ").Trim();
pageableRequests.Add(GetRequest("search-torrents", Settings.Categories, string.Format("&type=name&query={0}+{1}", Uri.EscapeDataString(artistQuery), Uri.EscapeDataString(albumQuery))));
return pageableRequests;
}
@ -32,7 +35,9 @@ namespace NzbDrone.Core.Indexers.FileList
{
var pageableRequests = new IndexerPageableRequestChain();
pageableRequests.Add(GetRequest("search-torrents", Settings.Categories, string.Format("&type=name&query={0}", Uri.EscapeDataString(searchCriteria.CleanArtistQuery.Trim()))));
var artistQuery = searchCriteria.CleanArtistQuery.Replace("+", " ").Trim();
pageableRequests.Add(GetRequest("search-torrents", Settings.Categories, string.Format("&type=name&query={0}", Uri.EscapeDataString(artistQuery))));
return pageableRequests;
}

@ -26,10 +26,10 @@ namespace NzbDrone.Core.Indexers.FileList
BaseUrl = "https://filelist.io";
MinimumSeeders = IndexerDefaults.MINIMUM_SEEDERS;
Categories = new int[]
Categories = new[]
{
(int)FileListCategories.AUDIO,
(int)FileListCategories.FLAC
(int)FileListCategories.Audio,
(int)FileListCategories.Flac
};
}
@ -62,9 +62,9 @@ namespace NzbDrone.Core.Indexers.FileList
public enum FileListCategories
{
[FieldOption]
AUDIO = 5,
[FieldOption]
FLAC = 11
[FieldOption(Label = "FLAC")]
Flac = 5,
[FieldOption(Label = "Audio")]
Audio = 11
}
}

Loading…
Cancel
Save