diff --git a/src/NzbDrone.Core/Indexers/Definitions/SpeedApp.cs b/src/NzbDrone.Core/Indexers/Definitions/SpeedApp.cs index 43d23d709..bc4078427 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/SpeedApp.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/SpeedApp.cs @@ -61,7 +61,7 @@ namespace NzbDrone.Core.Indexers.Definitions public override IParseIndexerResponse GetParser() { - return new SpeedAppParser(Settings); + return new SpeedAppParser(Settings, Capabilities.Categories); } protected override bool CheckIfLoginNeeded(HttpResponse httpResponse) @@ -347,13 +347,15 @@ namespace NzbDrone.Core.Indexers.Definitions public class SpeedAppParser : IParseIndexerResponse { - public SpeedAppSettings Settings { get; set; } + private readonly SpeedAppSettings _settings; + private readonly IndexerCapabilitiesCategories _categories; public Action, DateTime?> CookiesUpdater { get; set; } - public SpeedAppParser(SpeedAppSettings settings) + public SpeedAppParser(SpeedAppSettings settings, IndexerCapabilitiesCategories categories) { - Settings = settings; + _settings = settings; + _categories = categories; } public IList ParseResponse(IndexerResponse indexerResponse) @@ -377,12 +379,12 @@ namespace NzbDrone.Core.Indexers.Definitions Description = torrent.ShortDescription, Size = torrent.Size, ImdbId = ParseUtil.GetImdbID(torrent.ImdbId).GetValueOrDefault(), - DownloadUrl = $"{Settings.BaseUrl}/api/torrent/{torrent.Id}/download", + DownloadUrl = $"{_settings.BaseUrl}/api/torrent/{torrent.Id}/download", PosterUrl = torrent.Poster, InfoUrl = torrent.Url, Grabs = torrent.TimesCompleted, PublishDate = torrent.CreatedAt, - Categories = new List { new (torrent.Category.Id, torrent.Category.Name), }, + Categories = _categories.MapTrackerCatToNewznab(torrent.Category.Id.ToString()), InfoHash = null, Seeders = torrent.Seeders, Peers = torrent.Leechers + torrent.Seeders,