mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-05 13:21:25 -05:00
Fixed: Avoid requests without categories for FileList
This commit is contained in:
@@ -42,6 +42,11 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
|
||||
private IEnumerable<IndexerRequest> GetRequest(string searchType, string parameters)
|
||||
{
|
||||
if (Settings.Categories.Empty())
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
var categoriesQuery = string.Join(",", Settings.Categories.Distinct());
|
||||
|
||||
var baseUrl = $"{Settings.BaseUrl.TrimEnd('/')}/api.php?action={searchType}&category={categoriesQuery}{parameters}";
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
RuleFor(c => c.Username).NotEmpty();
|
||||
RuleFor(c => c.Passkey).NotEmpty();
|
||||
|
||||
RuleFor(c => c.Categories).NotEmpty();
|
||||
|
||||
RuleFor(c => c.SeedCriteria).SetValidator(_ => new SeedCriteriaSettingsValidator());
|
||||
}
|
||||
}
|
||||
@@ -32,8 +34,9 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
|
||||
Categories = new[]
|
||||
{
|
||||
(int)FileListCategories.Movie_HD,
|
||||
(int)FileListCategories.Movie_SD,
|
||||
(int)FileListCategories.Movie_HD,
|
||||
(int)FileListCategories.Movie_HDRO,
|
||||
(int)FileListCategories.Movie_4K
|
||||
};
|
||||
|
||||
@@ -80,6 +83,10 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
|
||||
public enum FileListCategories
|
||||
{
|
||||
[FieldOption(Label = "Anime")]
|
||||
Anime = 24,
|
||||
[FieldOption(Label = "Animation")]
|
||||
Animation = 15,
|
||||
[FieldOption("Movies SD")]
|
||||
Movie_SD = 1,
|
||||
[FieldOption("Movies DVD")]
|
||||
|
||||
Reference in New Issue
Block a user