mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-26 22:56:23 -04:00
New: Match search releases using IMDb ID if available
This commit is contained in:
@@ -38,7 +38,7 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
{
|
||||
var id = result.Id;
|
||||
|
||||
torrentInfos.Add(new TorrentInfo
|
||||
var torrentInfo = new TorrentInfo
|
||||
{
|
||||
Guid = $"FileList-{id}",
|
||||
Title = result.Name,
|
||||
@@ -48,9 +48,15 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
Seeders = result.Seeders,
|
||||
Peers = result.Leechers + result.Seeders,
|
||||
PublishDate = result.UploadDate.ToUniversalTime(),
|
||||
ImdbId = result.ImdbId,
|
||||
IndexerFlags = GetIndexerFlags(result)
|
||||
});
|
||||
};
|
||||
|
||||
if (result.ImdbId is { Length: > 2 } && int.TryParse(result.ImdbId.TrimStart('t'), out var imdbId) && imdbId > 0)
|
||||
{
|
||||
torrentInfo.ImdbId = $"tt{imdbId:D7}";
|
||||
}
|
||||
|
||||
torrentInfos.Add(torrentInfo);
|
||||
}
|
||||
|
||||
return torrentInfos.ToArray();
|
||||
|
||||
Reference in New Issue
Block a user