diff --git a/src/NzbDrone.Core.Test/MetadataSourceTests/TraktProxyFixture.cs b/src/NzbDrone.Core.Test/MetadataSourceTests/TraktProxyFixture.cs index b1df6db29..4577fe5c9 100644 --- a/src/NzbDrone.Core.Test/MetadataSourceTests/TraktProxyFixture.cs +++ b/src/NzbDrone.Core.Test/MetadataSourceTests/TraktProxyFixture.cs @@ -80,8 +80,6 @@ namespace NzbDrone.Core.Test.MetadataSourceTests episodes.GroupBy(e => e.SeasonNumber.ToString("000") + e.EpisodeNumber.ToString("000")) .Max(e => e.Count()).Should().Be(1); - episodes.Select(c => c.TvDbEpisodeId).Should().OnlyHaveUniqueItems(); - episodes.Should().Contain(c => c.SeasonNumber > 0); episodes.Should().Contain(c => !string.IsNullOrWhiteSpace(c.Overview)); @@ -98,7 +96,6 @@ namespace NzbDrone.Core.Test.MetadataSourceTests { episode.Should().NotBeNull(); episode.EpisodeNumber.Should().NotBe(0); - episode.TvDbEpisodeId.Should().BeGreaterThan(0); episode.Should().NotBeNull(); diff --git a/src/NzbDrone.Core.Test/TvTests/EpisodeRepositoryTests/EpisodesWithoutFilesFixture.cs b/src/NzbDrone.Core.Test/TvTests/EpisodeRepositoryTests/EpisodesWithoutFilesFixture.cs index e08d77b23..e59c67dec 100644 --- a/src/NzbDrone.Core.Test/TvTests/EpisodeRepositoryTests/EpisodesWithoutFilesFixture.cs +++ b/src/NzbDrone.Core.Test/TvTests/EpisodeRepositoryTests/EpisodesWithoutFilesFixture.cs @@ -48,7 +48,6 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests var monitoredSeriesEpisodes = Builder.CreateListOfSize(3) .All() .With(e => e.Id = 0) - .With(e => e.TvDbEpisodeId = RandomNumber) .With(e => e.SeriesId = _monitoredSeries.Id) .With(e => e.EpisodeFileId = 0) .With(e => e.AirDateUtc = DateTime.Now.AddDays(-5)) @@ -62,7 +61,6 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests var unmonitoredSeriesEpisodes = Builder.CreateListOfSize(3) .All() .With(e => e.Id = 0) - .With(e => e.TvDbEpisodeId = RandomNumber) .With(e => e.SeriesId = _unmonitoredSeries.Id) .With(e => e.EpisodeFileId = 0) .With(e => e.AirDateUtc = DateTime.Now.AddDays(-5)) diff --git a/src/NzbDrone.Core.Test/TvTests/RefreshEpisodeServiceFixture.cs b/src/NzbDrone.Core.Test/TvTests/RefreshEpisodeServiceFixture.cs index b02608d8d..bb89e1a8c 100644 Binary files a/src/NzbDrone.Core.Test/TvTests/RefreshEpisodeServiceFixture.cs and b/src/NzbDrone.Core.Test/TvTests/RefreshEpisodeServiceFixture.cs differ diff --git a/src/NzbDrone.Core/Datastore/Migration/024_drop_tvdb_episodeid.cs b/src/NzbDrone.Core/Datastore/Migration/024_drop_tvdb_episodeid.cs new file mode 100644 index 000000000..90144bcbb --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/024_drop_tvdb_episodeid.cs @@ -0,0 +1,14 @@ +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(24)] + public class drop_tvdb_episodeid : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + SqLiteAlter.DropColumns("Episodes", new[] { "TvDbEpisodeId" }); + } + } +} diff --git a/src/NzbDrone.Core/MetadataSource/TraktProxy.cs b/src/NzbDrone.Core/MetadataSource/TraktProxy.cs index b907a0a16..441f6ee21 100644 --- a/src/NzbDrone.Core/MetadataSource/TraktProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/TraktProxy.cs @@ -98,7 +98,6 @@ namespace NzbDrone.Core.MetadataSource episode.SeasonNumber = traktEpisode.season; episode.EpisodeNumber = traktEpisode.episode; episode.EpisodeNumber = traktEpisode.number; - episode.TvDbEpisodeId = traktEpisode.tvdb_id; episode.Title = traktEpisode.title; episode.AirDate = FromIsoToString(traktEpisode.first_aired_iso); episode.AirDateUtc = FromIso(traktEpisode.first_aired_iso); diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 7afcb1bb1..6c0c4bb3e 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -175,6 +175,7 @@ + diff --git a/src/NzbDrone.Core/Tv/Episode.cs b/src/NzbDrone.Core/Tv/Episode.cs index 51775a754..854dceb9c 100644 --- a/src/NzbDrone.Core/Tv/Episode.cs +++ b/src/NzbDrone.Core/Tv/Episode.cs @@ -11,7 +11,6 @@ namespace NzbDrone.Core.Tv { public const string AIR_DATE_FORMAT = "yyyy-MM-dd"; - public int TvDbEpisodeId { get; set; } public int SeriesId { get; set; } public int EpisodeFileId { get; set; } public int SeasonNumber { get; set; } @@ -39,7 +38,7 @@ namespace NzbDrone.Core.Tv public override string ToString() { - return string.Format("[{0}]{1}", TvDbEpisodeId, Title.NullSafe()); + return string.Format("[{0}]{1}", Id, Title.NullSafe()); } } } \ No newline at end of file diff --git a/src/NzbDrone.Core/Tv/RefreshEpisodeService.cs b/src/NzbDrone.Core/Tv/RefreshEpisodeService.cs index 1d1ca0a5b..f8436dc24 100644 --- a/src/NzbDrone.Core/Tv/RefreshEpisodeService.cs +++ b/src/NzbDrone.Core/Tv/RefreshEpisodeService.cs @@ -58,7 +58,6 @@ namespace NzbDrone.Core.Tv } episodeToUpdate.SeriesId = series.Id; - episodeToUpdate.TvDbEpisodeId = episode.TvDbEpisodeId; episodeToUpdate.EpisodeNumber = episode.EpisodeNumber; episodeToUpdate.SeasonNumber = episode.SeasonNumber; episodeToUpdate.Title = episode.Title; diff --git a/src/UI/System/Logs/Files/LogFileLayout.js b/src/UI/System/Logs/Files/LogFileLayout.js index e1ab9d69b..e4c272dfe 100644 --- a/src/UI/System/Logs/Files/LogFileLayout.js +++ b/src/UI/System/Logs/Files/LogFileLayout.js @@ -57,12 +57,11 @@ define( initialize: function () { this.collection = new LogFileCollection(); - vent.on(vent.Commands.ShowLogFile, this._fetchLogFileContents, this); + vent.on(vent.Commands.ShowLogFile, this._fetchLogFileContents, this); vent.on(vent.Events.CommandComplete, this._commandComplete, this); this.listenTo(this.collection, 'sync', this._collectionSynced); this.collection.fetch(); - }, onShow: function () {