diff --git a/src/NzbDrone.Api/Indexers/ReleaseResource.cs b/src/NzbDrone.Api/Indexers/ReleaseResource.cs index 0240ef6a5..c6e09c28a 100644 --- a/src/NzbDrone.Api/Indexers/ReleaseResource.cs +++ b/src/NzbDrone.Api/Indexers/ReleaseResource.cs @@ -27,13 +27,9 @@ namespace NzbDrone.Api.Indexers public string ReleaseHash { get; set; } public string Edition { get; set; } public string Title { get; set; } - public bool FullSeason { get; set; } - public int SeasonNumber { get; set; } public List Languages { get; set; } public int Year { get; set; } public string MovieTitle { get; set; } - public int[] EpisodeNumbers { get; set; } - public int[] AbsoluteEpisodeNumbers { get; set; } public bool Approved { get; set; } public bool TemporarilyRejected { get; set; } public bool Rejected { get; set; } @@ -111,8 +107,6 @@ namespace NzbDrone.Api.Indexers Approved = model.Approved, TemporarilyRejected = model.TemporarilyRejected, Rejected = model.Rejected, - TvdbId = releaseInfo.TvdbId, - TvRageId = releaseInfo.TvRageId, Rejections = model.Rejections.Select(r => r.Reason).ToList(), PublishDate = releaseInfo.PublishDate, CommentUrl = releaseInfo.CommentUrl, @@ -163,8 +157,6 @@ namespace NzbDrone.Api.Indexers model.IndexerId = resource.IndexerId; model.Indexer = resource.Indexer; model.DownloadProtocol = resource.DownloadProtocol; - model.TvdbId = resource.TvdbId; - model.TvRageId = resource.TvRageId; model.PublishDate = resource.PublishDate; return model; diff --git a/src/NzbDrone.Core.Test/IndexerTests/TorznabTests/TorznabFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/TorznabTests/TorznabFixture.cs index d65c92660..0ded98781 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/TorznabTests/TorznabFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/TorznabTests/TorznabFixture.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using FluentAssertions; using Moq; @@ -119,8 +119,7 @@ namespace NzbDrone.Core.Test.IndexerTests.TorznabTests releaseInfo.Indexer.Should().Be(Subject.Definition.Name); releaseInfo.PublishDate.Should().Be(DateTime.Parse("Wed, 17 May 2017 20:36:06 +0000").ToUniversalTime()); releaseInfo.Size.Should().Be(316477946); - releaseInfo.TvdbId.Should().Be(0); - releaseInfo.TvRageId.Should().Be(0); + releaseInfo.TmdbId.Should().Be(0); releaseInfo.InfoHash.Should().Be("2d69a861bef5a9f2cdf791b7328e37b7953205e1"); releaseInfo.Seeders.Should().BeNull(); releaseInfo.Peers.Should().BeNull(); diff --git a/src/NzbDrone.Core/History/HistoryService.cs b/src/NzbDrone.Core/History/HistoryService.cs index b2f6e60d3..5e02843b0 100644 --- a/src/NzbDrone.Core/History/HistoryService.cs +++ b/src/NzbDrone.Core/History/HistoryService.cs @@ -150,8 +150,7 @@ namespace NzbDrone.Core.History history.Data.Add("Size", message.Movie.Release.Size.ToString()); history.Data.Add("DownloadUrl", message.Movie.Release.DownloadUrl); history.Data.Add("Guid", message.Movie.Release.Guid); - history.Data.Add("TvdbId", message.Movie.Release.TvdbId.ToString()); - history.Data.Add("TvRageId", message.Movie.Release.TvRageId.ToString()); + history.Data.Add("TmdbId", message.Movie.Release.TmdbId.ToString()); history.Data.Add("Protocol", ((int)message.Movie.Release.DownloadProtocol).ToString()); history.Data.Add("IndexerFlags", message.Movie.Release.IndexerFlags.ToString()); history.Data.Add("IndexerId", message.Movie.Release.IndexerId.ToString()); diff --git a/src/NzbDrone.Core/Indexers/Rarbg/RarbgParser.cs b/src/NzbDrone.Core/Indexers/Rarbg/RarbgParser.cs index 89b82e080..dd7f7d713 100644 --- a/src/NzbDrone.Core/Indexers/Rarbg/RarbgParser.cs +++ b/src/NzbDrone.Core/Indexers/Rarbg/RarbgParser.cs @@ -59,16 +59,16 @@ namespace NzbDrone.Core.Indexers.Rarbg torrentInfo.Seeders = torrent.seeders; torrentInfo.Peers = torrent.leechers + torrent.seeders; - if (torrent.movie_info != null) + if (torrent.episode_info != null) { - if (torrent.movie_info.tvdb != null) + if (torrent.episode_info.imdb != null) { - torrentInfo.TvdbId = torrent.movie_info.tvdb.Value; + torrentInfo.ImdbId = int.Parse(torrent.episode_info.imdb.Substring(2)); } - if (torrent.movie_info.tvrage != null) + if (torrent.episode_info.themoviedb != null) { - torrentInfo.TvRageId = torrent.movie_info.tvrage.Value; + torrentInfo.TmdbId = torrent.episode_info.themoviedb.Value; } } diff --git a/src/NzbDrone.Core/Indexers/Rarbg/RarbgResponse.cs b/src/NzbDrone.Core/Indexers/Rarbg/RarbgResponse.cs index 2ba32d32b..07ae3cfee 100644 --- a/src/NzbDrone.Core/Indexers/Rarbg/RarbgResponse.cs +++ b/src/NzbDrone.Core/Indexers/Rarbg/RarbgResponse.cs @@ -19,7 +19,9 @@ namespace NzbDrone.Core.Indexers.Rarbg public int? leechers { get; set; } public long size { get; set; } public DateTime pubdate { get; set; } - public RarbgTorrentInfo movie_info { get; set; } + + //This is named episode_info for movies as well as shows + public RarbgTorrentInfo episode_info { get; set; } public int? ranked { get; set; } public string info_page { get; set; } } @@ -29,5 +31,6 @@ namespace NzbDrone.Core.Indexers.Rarbg public string imdb { get; set; } public int? tvrage { get; set; } public int? tvdb { get; set; } + public int? themoviedb { get; set; } } } diff --git a/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs b/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs index c9f6069f5..9b9aeeeb6 100644 --- a/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs +++ b/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text; using NzbDrone.Core.Indexers; @@ -16,8 +16,7 @@ namespace NzbDrone.Core.Parser.Model public string Indexer { get; set; } public int IndexerPriority { get; set; } public DownloadProtocol DownloadProtocol { get; set; } - public int TvdbId { get; set; } - public int TvRageId { get; set; } + public int TmdbId { get; set; } public int ImdbId { get; set; } public DateTime PublishDate { get; set; } @@ -75,8 +74,7 @@ namespace NzbDrone.Core.Parser.Model stringBuilder.AppendLine("Indexer: " + Indexer ?? "Empty"); stringBuilder.AppendLine("CommentUrl: " + CommentUrl ?? "Empty"); stringBuilder.AppendLine("DownloadProtocol: " + DownloadProtocol ?? "Empty"); - stringBuilder.AppendLine("TvdbId: " + TvdbId ?? "Empty"); - stringBuilder.AppendLine("TvRageId: " + TvRageId ?? "Empty"); + stringBuilder.AppendLine("TmdbId: " + TmdbId ?? "Empty"); stringBuilder.AppendLine("ImdbId: " + ImdbId ?? "Empty"); stringBuilder.AppendLine("PublishDate: " + PublishDate ?? "Empty"); return stringBuilder.ToString(); diff --git a/src/Radarr.Api.V3/Indexers/ReleaseResource.cs b/src/Radarr.Api.V3/Indexers/ReleaseResource.cs index f72a261d7..9955abf2c 100644 --- a/src/Radarr.Api.V3/Indexers/ReleaseResource.cs +++ b/src/Radarr.Api.V3/Indexers/ReleaseResource.cs @@ -35,6 +35,7 @@ namespace Radarr.Api.V3.Indexers public bool Approved { get; set; } public bool TemporarilyRejected { get; set; } public bool Rejected { get; set; } + public int TmdbId { get; set; } public int ImdbId { get; set; } public IEnumerable Rejections { get; set; } public DateTime PublishDate { get; set; } @@ -90,6 +91,7 @@ namespace Radarr.Api.V3.Indexers Approved = model.Approved, TemporarilyRejected = model.TemporarilyRejected, Rejected = model.Rejected, + TmdbId = releaseInfo.TmdbId, ImdbId = releaseInfo.ImdbId, Rejections = model.Rejections.Select(r => r.Reason).ToList(), PublishDate = releaseInfo.PublishDate, @@ -137,6 +139,7 @@ namespace Radarr.Api.V3.Indexers model.IndexerId = resource.IndexerId; model.Indexer = resource.Indexer; model.DownloadProtocol = resource.Protocol; + model.TmdbId = resource.TmdbId; model.ImdbId = resource.ImdbId; model.PublishDate = resource.PublishDate.ToUniversalTime();