Skip to content

Commit

Permalink
Fixed: (RED/OPS) Add log score to release titles
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameisbogdan committed Nov 29, 2023
1 parent 9dc1171 commit e12cd68
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
Expand Up @@ -44,7 +44,7 @@ public async Task should_parse_recent_feed_from_Orpheus()

var torrentInfo = releases.First() as TorrentInfo;

torrentInfo.Title.Should().Be("The Beatles - Abbey Road [1969] [Album] [2.0 Mix 2019] [MP3 V2 (VBR)] [BD]");
torrentInfo.Title.Should().Be("The Beatles - Abbey Road [1969] [Album] [2.0 Mix 2019] [MP3 V2 (VBR) / BD]");
torrentInfo.DownloadProtocol.Should().Be(DownloadProtocol.Torrent);
torrentInfo.DownloadUrl.Should().Be("https://orpheus.network/ajax.php?action=download&id=1902448");
torrentInfo.InfoUrl.Should().Be("https://orpheus.network/torrents.php?id=466&torrentid=1902448");
Expand Down
Expand Up @@ -44,7 +44,7 @@ public async Task should_parse_recent_feed_from_Redacted()

var torrentInfo = releases.First() as TorrentInfo;

torrentInfo.Title.Should().Be("Red Hot Chili Peppers - Californication [1999] [Album] [US / Reissue 2020] [FLAC 24bit Lossless] [Vinyl]");
torrentInfo.Title.Should().Be("Red Hot Chili Peppers - Californication [1999] [Album] [US / Reissue 2020] [FLAC 24bit Lossless / Vinyl]");
torrentInfo.DownloadProtocol.Should().Be(DownloadProtocol.Torrent);
torrentInfo.DownloadUrl.Should().Be("https://redacted.ch/ajax.php?action=download&id=3892313");
torrentInfo.InfoUrl.Should().Be("https://redacted.ch/torrents.php?id=16720&torrentid=3892313");
Expand Down
15 changes: 12 additions & 3 deletions src/NzbDrone.Core/Indexers/Definitions/Orpheus.cs
Expand Up @@ -374,14 +374,23 @@ private string GetTitle(GazelleRelease result, GazelleTorrent torrent)
title += $" [{$"{torrent.RemasterTitle} {torrent.RemasterYear}".Trim()}]";
}

title += $" [{torrent.Format} {torrent.Encoding}] [{torrent.Media}]";
var flags = new List<string>
{
$"{torrent.Format} {torrent.Encoding}",
$"{torrent.Media}"
};

if (torrent.HasLog)
{
flags.Add("Log (" + torrent.LogScore + "%)");
}

if (torrent.HasCue)
{
title += " [Cue]";
flags.Add("Cue");
}

return title;
return $"{title} [{string.Join(" / ", flags)}]";
}

private string GetDownloadUrl(int torrentId, bool canUseToken)
Expand Down
15 changes: 12 additions & 3 deletions src/NzbDrone.Core/Indexers/Definitions/Redacted.cs
Expand Up @@ -357,14 +357,23 @@ private string GetTitle(GazelleRelease result, GazelleTorrent torrent)
title += $" [{$"{torrent.RemasterTitle} {torrent.RemasterYear}".Trim()}]";
}

title += $" [{torrent.Format} {torrent.Encoding}] [{torrent.Media}]";
var flags = new List<string>
{
$"{torrent.Format} {torrent.Encoding}",
$"{torrent.Media}"
};

if (torrent.HasLog)
{
flags.Add("Log (" + torrent.LogScore + "%)");
}

if (torrent.HasCue)
{
title += " [Cue]";
flags.Add("Cue");
}

return title;
return $"{title} [{string.Join(" / ", flags)}]";
}

private string GetDownloadUrl(int torrentId, bool canUseToken)
Expand Down

0 comments on commit e12cd68

Please sign in to comment.