mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-30 04:14:56 +01:00
Use info urls as guid and add remaster name to title for SecretCinema
This commit is contained in:
parent
6a9e27bc06
commit
fe35d450f0
1 changed files with 13 additions and 6 deletions
|
|
@ -104,6 +104,7 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
foreach (var torrent in result.Torrents)
|
||||
{
|
||||
var id = torrent.TorrentId;
|
||||
var infoUrl = GetInfoUrl(result.GroupId, id);
|
||||
|
||||
// in SC movies, artist=director and GroupName=title
|
||||
var artist = WebUtility.HtmlDecode(result.Artist);
|
||||
|
|
@ -112,8 +113,8 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
|
||||
var release = new TorrentInfo
|
||||
{
|
||||
Guid = $"SecretCinema-{id}",
|
||||
InfoUrl = GetInfoUrl(result.GroupId, id),
|
||||
Guid = infoUrl,
|
||||
InfoUrl = infoUrl,
|
||||
DownloadUrl = GetDownloadUrl(id),
|
||||
Title = title,
|
||||
Container = torrent.Encoding,
|
||||
|
|
@ -143,7 +144,12 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
{
|
||||
// Remove director from title
|
||||
// SC API returns no more useful information than this
|
||||
release.Title = $"{title} ({result.GroupYear}) {torrent.Media}";
|
||||
release.Title = $"{title} ({result.GroupYear}) {torrent.Media}".Trim();
|
||||
|
||||
if (torrent.RemasterTitle.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
release.Title += $" [{torrent.RemasterTitle.Trim()}]";
|
||||
}
|
||||
|
||||
// Replace media formats with standards
|
||||
release.Title = Regex.Replace(release.Title, @"\bBDMV\b", "COMPLETE BLURAY", RegexOptions.IgnoreCase);
|
||||
|
|
@ -168,12 +174,13 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
else
|
||||
{
|
||||
var id = result.TorrentId;
|
||||
var infoUrl = GetInfoUrl(result.GroupId, id);
|
||||
var groupName = WebUtility.HtmlDecode(result.GroupName);
|
||||
|
||||
var release = new TorrentInfo
|
||||
{
|
||||
Guid = $"SecretCinema-{id}",
|
||||
InfoUrl = GetInfoUrl(result.GroupId, id),
|
||||
Guid = infoUrl,
|
||||
InfoUrl = infoUrl,
|
||||
DownloadUrl = GetDownloadUrl(id),
|
||||
Title = groupName,
|
||||
Size = long.Parse(result.Size),
|
||||
|
|
@ -209,7 +216,7 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
|
||||
private bool IsAnyMovieCategory(ICollection<IndexerCategory> category)
|
||||
{
|
||||
return category.Contains(NewznabStandardCategory.Movies) || NewznabStandardCategory.Movies.SubCategories.Any(subCat => category.Contains(subCat));
|
||||
return category.Contains(NewznabStandardCategory.Movies) || NewznabStandardCategory.Movies.SubCategories.Any(category.Contains);
|
||||
}
|
||||
|
||||
private string GetDownloadUrl(int torrentId)
|
||||
|
|
|
|||
Loading…
Reference in a new issue