Fixed: Add missing info to Gazelle/Redacted results

Fixes #1501
pull/1689/head
ta264 4 years ago committed by Qstick
parent 6c2cd7fe16
commit 1830f46d27

@ -52,7 +52,7 @@ namespace NzbDrone.Core.Test.IndexerTests.GazelleTests
var releaseInfo = releases.First();
releaseInfo.Title.Should().Be("Shania Twain - Shania Twain (1993) [FLAC 24bit Lossless]");
releaseInfo.Title.Should().Be("Shania Twain - Shania Twain (1993) [FLAC 24bit Lossless] [WEB]");
releaseInfo.DownloadProtocol.Should().Be(DownloadProtocol.Torrent);
releaseInfo.DownloadUrl.Should()
.Be("http://someurl.ch/torrents.php?action=download&id=1541452&authkey=redacted&torrent_pass=redacted");

@ -23,7 +23,7 @@ namespace NzbDrone.Core.Indexers.Gazelle
public string Format { get; set; }
public bool HasLog { get; set; }
public int LogScore { get; set; }
public bool HasQueue { get; set; }
public bool HasCue { get; set; }
public bool Scene { get; set; }
public bool VanityHouse { get; set; }
public int FileCount { get; set; }

@ -57,13 +57,19 @@ namespace NzbDrone.Core.Indexers.Gazelle
var artist = WebUtility.HtmlDecode(result.Artist);
var album = WebUtility.HtmlDecode(result.GroupName);
var title = $"{result.Artist} - {result.GroupName} ({result.GroupYear}) [{torrent.Format} {torrent.Encoding}] [{torrent.Media}]";
if (torrent.HasCue)
{
title += " [Cue]";
}
torrentInfos.Add(new GazelleInfo()
{
Guid = string.Format("Gazelle-{0}", id),
Artist = artist,
// Splice Title from info to avoid calling API again for every torrent.
Title = WebUtility.HtmlDecode(result.Artist + " - " + result.GroupName + " (" + result.GroupYear + ") [" + torrent.Format + " " + torrent.Encoding + "]"),
Title = WebUtility.HtmlDecode(title),
Album = album,
Container = torrent.Encoding,
Codec = torrent.Format,

@ -50,13 +50,19 @@ namespace NzbDrone.Core.Indexers.Redacted
var artist = WebUtility.HtmlDecode(result.Artist);
var album = WebUtility.HtmlDecode(result.GroupName);
var title = $"{result.Artist} - {result.GroupName} ({result.GroupYear}) [{torrent.Format} {torrent.Encoding}] [{torrent.Media}]";
if (torrent.HasCue)
{
title += " [Cue]";
}
torrentInfos.Add(new GazelleInfo()
{
Guid = string.Format("Redacted-{0}", id),
Artist = artist,
// Splice Title from info to avoid calling API again for every torrent.
Title = WebUtility.HtmlDecode(result.Artist + " - " + result.GroupName + " (" + result.GroupYear + ") [" + torrent.Format + " " + torrent.Encoding + "]"),
Title = WebUtility.HtmlDecode(title),
Album = album,
Container = torrent.Encoding,
Codec = torrent.Format,

Loading…
Cancel
Save