diff --git a/src/NzbDrone.Core/Indexers/FileList/FileListRequestGenerator.cs b/src/NzbDrone.Core/Indexers/FileList/FileListRequestGenerator.cs index df7c47dba..37c421456 100644 --- a/src/NzbDrone.Core/Indexers/FileList/FileListRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/FileList/FileListRequestGenerator.cs @@ -23,7 +23,10 @@ public IndexerPageableRequestChain GetSearchRequests(AlbumSearchCriteria searchC { 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 @@ public IndexerPageableRequestChain GetSearchRequests(ArtistSearchCriteria search { 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; } diff --git a/src/NzbDrone.Core/Indexers/FileList/FileListSettings.cs b/src/NzbDrone.Core/Indexers/FileList/FileListSettings.cs index e20f72eeb..e2e919265 100644 --- a/src/NzbDrone.Core/Indexers/FileList/FileListSettings.cs +++ b/src/NzbDrone.Core/Indexers/FileList/FileListSettings.cs @@ -26,10 +26,10 @@ public FileListSettings() 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 @@ public NzbDroneValidationResult Validate() public enum FileListCategories { - [FieldOption] - AUDIO = 5, - [FieldOption] - FLAC = 11 + [FieldOption(Label = "FLAC")] + Flac = 5, + [FieldOption(Label = "Audio")] + Audio = 11 } }