1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-19 21:46:50 -04:00

Fixed: Remove support for IMDb Lists of the form 'ls12345678'

This commit is contained in:
Bogdan
2025-04-07 16:32:11 +03:00
parent a23983032a
commit d9704a999d
2 changed files with 6 additions and 5 deletions
@@ -12,7 +12,7 @@ namespace NzbDrone.Core.ImportLists.RadarrList2.IMDbList
// Use IMDb list Export for user lists to bypass RadarrAPI caching // Use IMDb list Export for user lists to bypass RadarrAPI caching
if (Settings.ListId.StartsWith("ls", StringComparison.OrdinalIgnoreCase)) if (Settings.ListId.StartsWith("ls", StringComparison.OrdinalIgnoreCase))
{ {
return new HttpRequest($"https://www.imdb.com/list/{Settings.ListId}/export", new HttpAccept("*/*")); throw new Exception("IMDb lists of the form 'ls12345678' are no longer supported. Feel free to remove this list after you review your Clean Library Level.");
} }
return RequestBuilder.Create() return RequestBuilder.Create()
@@ -8,9 +8,10 @@ namespace NzbDrone.Core.ImportLists.RadarrList2.IMDbList
{ {
public IMDbSettingsValidator() public IMDbSettingsValidator()
{ {
RuleFor(c => c.ListId) RuleFor(c => c.ListId).Cascade(CascadeMode.Stop)
.Matches(@"^top250$|^popular$|^ls\d+$|^ur\d+$") .NotEmpty()
.WithMessage("List ID must be 'top250', 'popular', an IMDb List ID of the form 'ls12345678' or an IMDb user watchlist of the form 'ur12345678'"); .Matches(@"^(top250|popular)$|^ur\d+$")
.WithMessage("List ID must be 'top250', 'popular' or an IMDb user watchlist of the form 'ur12345678'");
} }
} }
@@ -18,7 +19,7 @@ namespace NzbDrone.Core.ImportLists.RadarrList2.IMDbList
{ {
private static readonly IMDbSettingsValidator Validator = new (); private static readonly IMDbSettingsValidator Validator = new ();
[FieldDefinition(1, Label = "List/User ID", HelpText = "IMDb list ID (e.g ls12345678), IMDb user ID (e.g. ur12345678), 'top250' or 'popular'")] [FieldDefinition(1, Label = "List/User ID", HelpText = "IMDb user ID (e.g. ur12345678), 'top250' or 'popular'")]
public string ListId { get; set; } public string ListId { get; set; }
public override NzbDroneValidationResult Validate() public override NzbDroneValidationResult Validate()