1
0
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:
Bogdan
2024-08-11 18:46:46 +03:00
committed by GitHub
parent 0877a6718d
commit 363f8fc347
20 changed files with 181 additions and 66 deletions
@@ -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();