mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
Fixed: (BTN) Improve M2TS and ISO titles for BR-DISK detection
This commit is contained in:
parent
f4d621063b
commit
2648f2c639
1 changed files with 11 additions and 3 deletions
|
|
@ -88,7 +88,7 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
Guid = $"BTN-{torrent.TorrentID}",
|
||||
InfoUrl = $"{protocol}//broadcasthe.net/torrents.php?id={torrent.GroupID}&torrentid={torrent.TorrentID}",
|
||||
DownloadUrl = RegexProtocol.Replace(torrent.DownloadURL, protocol),
|
||||
Title = CleanReleaseName(torrent.ReleaseName),
|
||||
Title = GetTitle(torrent),
|
||||
Categories = _categories.MapTrackerCatToNewznab(torrent.Resolution),
|
||||
InfoHash = torrent.InfoHash,
|
||||
Size = torrent.Size,
|
||||
|
|
@ -136,9 +136,17 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
return releaseInfos;
|
||||
}
|
||||
|
||||
private string CleanReleaseName(string releaseName)
|
||||
private static string GetTitle(BroadcastheNetTorrent torrent)
|
||||
{
|
||||
return releaseName.Replace("\\", "");
|
||||
var releaseName = torrent.ReleaseName.Replace("\\", "");
|
||||
|
||||
if (torrent.Container.ToUpperInvariant() is "M2TS" or "ISO")
|
||||
{
|
||||
releaseName = Regex.Replace(releaseName, @"\b(H\.?265)\b", "HEVC", RegexOptions.Compiled);
|
||||
releaseName = Regex.Replace(releaseName, @"\b(H\.?264)\b", "AVC", RegexOptions.Compiled);
|
||||
}
|
||||
|
||||
return releaseName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue