mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Fixed: (Gazelle) Add usetoken
only if use FL token is enabled
This commit is contained in:
parent
2cabc3eb0d
commit
fbb05dcec9
2 changed files with 8 additions and 3 deletions
|
@ -56,7 +56,7 @@ namespace NzbDrone.Core.Test.IndexerTests.GazelleTests
|
|||
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&usetoken=0");
|
||||
.Be("http://someurl.ch/torrents.php?action=download&id=1541452&authkey=redacted&torrent_pass=redacted");
|
||||
releaseInfo.InfoUrl.Should().Be("http://someurl.ch/torrents.php?id=106951&torrentid=1541452");
|
||||
releaseInfo.CommentUrl.Should().Be(null);
|
||||
releaseInfo.Indexer.Should().Be(Subject.Definition.Name);
|
||||
|
|
|
@ -99,8 +99,13 @@ namespace NzbDrone.Core.Indexers.Gazelle
|
|||
.AddQueryParam("action", "download")
|
||||
.AddQueryParam("id", torrentId)
|
||||
.AddQueryParam("authkey", _settings.AuthKey)
|
||||
.AddQueryParam("torrent_pass", _settings.PassKey)
|
||||
.AddQueryParam("usetoken", _settings.UseFreeleechToken ? 1 : 0);
|
||||
.AddQueryParam("torrent_pass", _settings.PassKey);
|
||||
|
||||
// Orpheus fails to download if usetoken=0 so we need to only add if we will use one
|
||||
if (_settings.UseFreeleechToken)
|
||||
{
|
||||
url = url.AddQueryParam("usetoken", "1");
|
||||
}
|
||||
|
||||
return url.FullUri;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue