mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Many torrent indexers use full ImdbId instead of int version
Fixes #192
This commit is contained in:
@@ -10,6 +10,7 @@ using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.IndexerSearch;
|
||||
using NzbDrone.Core.Parser;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using Prowlarr.Http.Extensions;
|
||||
using Prowlarr.Http.REST;
|
||||
@@ -51,6 +52,14 @@ namespace NzbDrone.Api.V1.Indexers
|
||||
throw new BadRequestException("Missing Function Parameter");
|
||||
}
|
||||
|
||||
if (request.imdbid.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
if (!int.TryParse(request.imdbid, out var imdb) || imdb == 0)
|
||||
{
|
||||
throw new BadRequestException("Invalid Value for ImdbId");
|
||||
}
|
||||
}
|
||||
|
||||
var indexer = _indexerFactory.Get(id);
|
||||
|
||||
if (indexer == null)
|
||||
|
Reference in New Issue
Block a user