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

View file

@ -12,7 +12,7 @@ protected override HttpRequest GetHttpRequest()
// Use IMDb list Export for user lists to bypass RadarrAPI caching
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()

View file

@ -8,9 +8,10 @@ public class IMDbSettingsValidator : AbstractValidator<IMDbListSettings>
{
public IMDbSettingsValidator()
{
RuleFor(c => c.ListId)
.Matches(@"^top250$|^popular$|^ls\d+$|^ur\d+$")
.WithMessage("List ID must be 'top250', 'popular', an IMDb List ID of the form 'ls12345678' or an IMDb user watchlist of the form 'ur12345678'");
RuleFor(c => c.ListId).Cascade(CascadeMode.Stop)
.NotEmpty()
.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 @@ public class IMDbListSettings : ImportListSettingsBase<IMDbListSettings>
{
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 override NzbDroneValidationResult Validate()