diff --git a/src/Jackett.Common/Indexers/yts.cs b/src/Jackett.Common/Indexers/yts.cs index e09875d9f..fa426b92f 100644 --- a/src/Jackett.Common/Indexers/yts.cs +++ b/src/Jackett.Common/Indexers/yts.cs @@ -23,17 +23,11 @@ namespace Jackett.Indexers "https://yts.ag/", }; - private Uri BaseUri - { - get { return new Uri(configData.Url.Value); } - set { configData.Url.Value = value.ToString(); } - } + private string ApiEndpoint { get { return SiteLink + "api/v2/list_movies.json"; } } - private string ApiEndpoint { get { return BaseUri + "api/v2/list_movies.json"; } } - - private new ConfigurationDataUrl configData + private new ConfigurationData configData { - get { return (ConfigurationDataUrl)base.configData; } + get { return (ConfigurationData)base.configData; } set { base.configData = value; } } @@ -46,7 +40,7 @@ namespace Jackett.Indexers client: wc, logger: l, p: ps, - configData: new ConfigurationDataUrl(defaultSiteLink)) + configData: new ConfigurationData()) { Encoding = Encoding.GetEncoding("windows-1252"); Language = "en-us"; @@ -142,7 +136,8 @@ namespace Jackett.Indexers var release = new ReleaseInfo(); // Append the quality to the title because thats how radarr seems to be determining the quality? - release.Title = movie_item.Value("title_long") + " " + torrent_info.Value("quality"); + // All releases are BRRips, see issue #2200 + release.Title = movie_item.Value("title_long") + " " + torrent_info.Value("quality") + " BRRip"; var imdb = movie_item.Value("imdb_code"); release.Imdb = ParseUtil.GetImdbID(imdb); @@ -164,15 +159,16 @@ namespace Jackett.Indexers var dateStr = torrent_info.Value("date_uploaded"); var dateTime = DateTime.ParseExact(dateStr, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); release.PublishDate = DateTime.SpecifyKind(dateTime, DateTimeKind.Utc).ToLocalTime(); - release.Link = new Uri(torrent_info.Value("url")); + release.Link = new Uri(torrent_info.Value("url")); release.Seeders = torrent_info.Value("seeds"); release.Peers = torrent_info.Value("peers") + release.Seeders; release.Size = torrent_info.Value("size_bytes"); release.DownloadVolumeFactor = 0; release.UploadVolumeFactor = 1; - release.Comments = release.Link; - release.Guid = release.Comments; + release.Comments = new Uri(movie_item.Value("url")); + release.BannerUrl = new Uri(movie_item.Value("large_cover_image")); + release.Guid = release.Link; // Hack to prevent adding non-specified catogery, since API doesn't seem to be working string categories = string.Join(";", MapTorznabCapsToTrackers(query));