From d22905676c5b56df5ca72f8fb656694229f3252c Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sat, 28 May 2011 18:58:35 -0700 Subject: [PATCH 1/4] Fixed American Dad's scene naming gong show --- NzbDrone.Core.Test/TvDbProviderTest.cs | 72 ++++++++++++++++++++----- NzbDrone.Core/Providers/TvDbProvider.cs | 28 +++++++++- 2 files changed, 86 insertions(+), 14 deletions(-) diff --git a/NzbDrone.Core.Test/TvDbProviderTest.cs b/NzbDrone.Core.Test/TvDbProviderTest.cs index 992f991be..2d89d21e5 100644 --- a/NzbDrone.Core.Test/TvDbProviderTest.cs +++ b/NzbDrone.Core.Test/TvDbProviderTest.cs @@ -1,5 +1,6 @@ // ReSharper disable RedundantUsingDirective using System; +using System.Linq; using MbUnit.Framework; using NzbDrone.Core.Providers; using NzbDrone.Core.Test.Framework; @@ -38,19 +39,19 @@ namespace NzbDrone.Core.Test [Test] - [Row(new object[] {"CAPITAL", "capital", true})] - [Row(new object[] {"Something!!", "Something", true})] - [Row(new object[] {"Simpsons 2000", "Simpsons", true})] - [Row(new object[] {"Simp222sons", "Simpsons", true})] - [Row(new object[] {"Simpsons", "The Simpsons", true})] - [Row(new object[] {"Law and order", "Law & order", true})] - [Row(new object[] {"xxAndxx", "xxxx", false})] - [Row(new object[] {"Andxx", "xx", false})] - [Row(new object[] {"xxAnd", "xx", false})] - [Row(new object[] {"Thexx", "xx", false})] - [Row(new object[] {"Thexx", "xx", false})] - [Row(new object[] {"xxThexx", "xxxxx", false})] - [Row(new object[] {"Simpsons The", "Simpsons", true})] + [Row(new object[] { "CAPITAL", "capital", true })] + [Row(new object[] { "Something!!", "Something", true })] + [Row(new object[] { "Simpsons 2000", "Simpsons", true })] + [Row(new object[] { "Simp222sons", "Simpsons", true })] + [Row(new object[] { "Simpsons", "The Simpsons", true })] + [Row(new object[] { "Law and order", "Law & order", true })] + [Row(new object[] { "xxAndxx", "xxxx", false })] + [Row(new object[] { "Andxx", "xx", false })] + [Row(new object[] { "xxAnd", "xx", false })] + [Row(new object[] { "Thexx", "xx", false })] + [Row(new object[] { "Thexx", "xx", false })] + [Row(new object[] { "xxThexx", "xxxxx", false })] + [Row(new object[] { "Simpsons The", "Simpsons", true })] public void Name_match_test(string a, string b, bool match) { bool result = TvDbProvider.IsTitleMatch(a, b); @@ -83,5 +84,50 @@ namespace NzbDrone.Core.Test //assert Assert.IsNull(result); } + + + [Test] + public void American_dad_fix() + { + //setup + var tvdbProvider = new TvDbProvider(); + + //act + var result = tvdbProvider.GetSeries(73141, true); + + var seasons = result.Episodes.Select(e => e.SeasonNumber) + .Distinct().ToList(); + + + + var seasons1 = result.Episodes.Where(e => e.SeasonNumber == 1).ToList(); + var seasons2 = result.Episodes.Where(e => e.SeasonNumber == 2).ToList(); + var seasons3 = result.Episodes.Where(e => e.SeasonNumber == 3).ToList(); + var seasons4 = result.Episodes.Where(e => e.SeasonNumber == 4).ToList(); + var seasons5 = result.Episodes.Where(e => e.SeasonNumber == 5).ToList(); + var seasons6 = result.Episodes.Where(e => e.SeasonNumber == 6).ToList(); + + + foreach (var episode in result.Episodes) + { + Console.WriteLine(episode); + } + + //assert + Assert.Count(7, seasons); + Assert.Count(23, seasons1); + Assert.Count(19, seasons2); + Assert.Count(16, seasons3); + Assert.Count(20, seasons4); + Assert.Count(18, seasons5); + + Assert.Distinct(seasons1.Select(s => s.EpisodeNumber)); + Assert.Distinct(seasons2.Select(s => s.EpisodeNumber)); + Assert.Distinct(seasons3.Select(s => s.EpisodeNumber)); + Assert.Distinct(seasons4.Select(s => s.EpisodeNumber)); + Assert.Distinct(seasons5.Select(s => s.EpisodeNumber)); + Assert.Distinct(seasons6.Select(s => s.EpisodeNumber)); + + } } } \ No newline at end of file diff --git a/NzbDrone.Core/Providers/TvDbProvider.cs b/NzbDrone.Core/Providers/TvDbProvider.cs index ad3340129..7916f3b02 100644 --- a/NzbDrone.Core/Providers/TvDbProvider.cs +++ b/NzbDrone.Core/Providers/TvDbProvider.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Collections.Generic; using System.Text.RegularExpressions; using NLog; @@ -79,7 +80,32 @@ namespace NzbDrone.Core.Providers lock (_handler) { Logger.Debug("Fetching SeriesId'{0}' from tvdb", id); - return _handler.GetSeries(id, TvdbLanguage.DefaultLanguage, loadEpisodes, false, false); + var result = _handler.GetSeries(id, TvdbLanguage.DefaultLanguage, loadEpisodes, false, false); + + + //Fix American Dad's scene gongshow + if (result != null && result.Id == 73141) + { + var seasonOneEpisodeCount = result.Episodes.Where(e => e.SeasonNumber == 0).Count(); + var seasonOneId = result.Episodes.Where(e => e.SeasonNumber == 1).First().SeasonId; + + foreach (var episode in result.Episodes) + { + if (episode.SeasonNumber > 1) + { + if (episode.SeasonNumber == 2) + { + episode.EpisodeNumber = episode.EpisodeNumber + seasonOneEpisodeCount; + episode.SeasonId = seasonOneId; + } + + episode.SeasonNumber = episode.SeasonNumber - 1; + } + + } + } + + return result; } } From db3eeda50f56a96d02984f25b99af05363d210b3 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sat, 28 May 2011 20:01:35 -0700 Subject: [PATCH 2/4] Cleaned up RefreshEpisodeInfo added tests --- NzbDrone.Core.Test/EpisodeProviderTest.cs | Bin 3194 -> 9274 bytes NzbDrone.Core/Providers/EpisodeProvider.cs | Bin 10048 -> 9658 bytes NzbDrone.Core/Providers/Jobs/UpdateInfoJob.cs | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/NzbDrone.Core.Test/EpisodeProviderTest.cs b/NzbDrone.Core.Test/EpisodeProviderTest.cs index b4d2c2836f7424ca77c49debbb9037d46446893e..3d8d096e401d947ec8464b65564a0379c63c3c96 100644 GIT binary patch literal 9274 zcmeHMUvJws5Z`lvdk5 z(!Rp(MA9N<$(h@v?Skqdj>O~L@&5cs-u?5}-`m^dlJ&IX^s?_dh z!+sL;z%LjrBwfwI;Ta$L$5c}IxVaI-qQ#U3jJR4N@6C;mn;Qh4xA=C-KgcX)f2vQF zG0}?yZ~+I;$MS+sAPyAqG#f@dAVEZhASY8Uz3-P<+?C zW(f}=25-RcW6iM_-y{PznaVjX+-oRSILBg#uiM+*G^O!K3&T(Npzf0JSP}t2$V4wB z2jqEcclQ}sN|C6)1tC*wIZ85^bwFA>K#*pwjWTkG|;Vk~;oT%BW-) z?7i3U-*7qhTrRnKhVd=VWxmz*xANJZSYNZ>LGNSUlQ-AG+1B zoLtM=9q@BYcvUmC=>uix-2EmJ8fIFpgOw*O_tv^r^H<|5q`2nCK$;}MEkLlciUv5A zdW|Ke6rtZ|@(6<(P})0(xtRGcnLIH$qF@MYQO5v?aUO)y@z5k}r^>r1Dw}$GX)sN# z&J#M5nnb1#E6u?R>JUdI2LaqTIYXg8J+naismrNwljP2{VwiE^CWrWD(DD9S) z4Kf6%ToQw(r-1}4Hi>?}U^KHzro(y37AUr26*ac@{{R!-%=4@&O;ozVjs)oAq;Atz zw?^E8Ejn1_F=UkbgdkSvn4^CU0-wYJ_Jls8B8dlF3<3(9c{oVofDPcZFcA5O9WfsZ z#wf4AQWGi=-c_KxK9IVCP?&;N9i-Ylh{#_8nY(M@WPy-h0r31>+SQny@>EFgSwqQ$ zZLLE>$XImRMK&4ckkV@S-8l4|!5o}gt#v>anSjJgHlaL*0|4x2IkG!^7ed>0Lfh>% zgc@uvO?h%~UX2i#zlUs0XFN&$zJ%kmEEysX{l@@kWNe=MA@M(8v754*rCGKLSR36H zhM8T*#v*IuX|_g9}H8;1wSaR1I=);9T7nS1(1-sK|87@MTO{sod*n2-m+nW7pGfr_iDc zM|HT!t-`m5!5sDhE{w3XR|1c<5-TmA+M(|U_Iyug4s$?oQ_S6UF*98(>_Z4g%**qw z8_)NPBI5pO76%3vnq-(HQ3ueWvGV$A3M~3s;g)pr!OH9AH@eb3K60*yOw}$dLAZr2 z>!GAwTKGH^e=Ov@Wo$Z-W5!d1roC`*!y`7};X@wYBouIY%=!wOoq}ugTlMaqy85~%&4>12NEa!g;N$w@bE<$Qx7;G$ z`PaNQ+TphhgH?wylI2ID(5}*C5%yeMgRBHHm-NxM01IZ87x_hsmXQzlt17GAw@IOf zwlB(HSYfausOSwT)PSqyK{dKl;j2^`z%3-A1HN4qcclYLJI&`^7QVMFZ89-D z9W)HQy}jn5X9wt>w_3iG=dQ(5n@+cI3Vn4A--gR_9sezyc%d!JWle1#l3);04mBk) zPKq+qiet$=yOX_cosH{ss4AwL&d-(GpDOvS=rLd{scuZZ(>`ytf8H$-Z*N1Zr?4Xm z#bv4PgegA4&aW3>G*Dd4IN@4#^ZFI@c zh+9@iZ<~fd>0=wP#G$HDR#F&_5n5qe#fsh`Sg@vvriEh5r7Rz~Yn>PUGDl3wOFGSZ c;v!M)Ow<1ocG51A09Ot#pMLuBd_4>N3%q#yNdN!< delta 239 zcmdnx@k?UEI;P2j3euY|GX*kDHc*hBoX0OZIZi=m@(b2JZoRP7qRh0+#H5_m$%Wj) zO#1qhTR^QcFsU@`_zj(-KQ_N;D?(38>4IB^D_Zmn+yR1efF&lqZ%XXXpi& zBo>wUrIu?O92XM5zNi|URwU-iCl^xiM3oi(Ig7FWza-sa4!ZaHRJI|mDoIir-=zwXtFH7&E&&EVnSt! zMGC0}nZ@}jsUi8H1u2OolZ%D21yDp%6>KNJ6S9y)RRKspyCa8IOo+)7U0_f&Xe!{QFh(oGgKoysiyr48LsVqTd98!~npqemz>0g#w lRF(-0NrZ!8LX!^&NlxYw{Q->D&HqIW7*Qi}vz0iT006Xo*fanD delta 832 zcmdnxeZX%+59j0pX7vBbLCl;lrmIQ-kCr{y0oVAixgCuLY#xY>@bKK}AL#3{?iKEYcxm zE=f>RJX3(Crb5iu^Gw02ezLxhDt415dkRbAkf|2JC9_vZ8M_`4NHBt(1PgDh4w4DU zEXe@{2h8D6&-f+grebJdteu?CFUMPvSzMBtmkv=mc@}@RIEqNBf+8?VhK Date: Sat, 28 May 2011 20:37:19 -0700 Subject: [PATCH 3/4] More episode update fixes, tests --- NzbDrone.Core.Test/EpisodeProviderTest.cs | 145 ++++++++++++++++----- NzbDrone.Core/Providers/EpisodeProvider.cs | Bin 9658 -> 10102 bytes 2 files changed, 116 insertions(+), 29 deletions(-) diff --git a/NzbDrone.Core.Test/EpisodeProviderTest.cs b/NzbDrone.Core.Test/EpisodeProviderTest.cs index 3d8d096e4..3cae3f3fb 100644 --- a/NzbDrone.Core.Test/EpisodeProviderTest.cs +++ b/NzbDrone.Core.Test/EpisodeProviderTest.cs @@ -66,11 +66,14 @@ namespace NzbDrone.Core.Test const int seriesId = 71663; var fakeEpisodes = Builder.CreateNew() .With(c => c.Episodes = new List(Builder.CreateListOfSize(6). - WhereAll().Have(l => l.Language = new TvdbLanguage(0, "eng", "a")) - .WhereTheFirst(3).Have(d => d.SeasonNumber = 1).And(d => d.SeasonId = 11) - .AndTheRemaining().Have(d => d.SeasonNumber = 2).And(d => d.SeasonId = 22) - .Build()) - ).With(c => c.Id = seriesId).Build(); + WhereAll().Have( + l => l.Language = new TvdbLanguage(0, "eng", "a")) + .WhereTheFirst(3).Have(d => d.SeasonNumber = 1).And( + d => d.SeasonId = 11) + .AndTheRemaining().Have(d => d.SeasonNumber = 2).And( + d => d.SeasonId = 22) + .Build()) + ).With(c => c.Id = seriesId).Build(); var fakeSeries = Builder.CreateNew().With(c => c.SeriesId = seriesId).Build(); @@ -97,7 +100,7 @@ namespace NzbDrone.Core.Test const int seriesId = 71663; var fakeEpisodes = Builder.CreateNew() .With(c => c.Episodes = new List(Builder.CreateListOfSize(5).Build()) - ).With(c => c.Id = seriesId).Build(); + ).With(c => c.Id = seriesId).Build(); var fakeSeries = Builder.CreateNew().With(c => c.SeriesId = seriesId).Build(); @@ -113,8 +116,10 @@ namespace NzbDrone.Core.Test mocker.Resolve().RefreshEpisodeInfo(fakeSeries); //Assert - mocker.GetMock().Verify(c => c.AddMany(It.Is>(e => e.Count() == fakeEpisodes.Episodes.Count)), Times.Once()); - mocker.GetMock().Verify(c => c.UpdateMany(It.Is>(e => e.Count() == 0)), Times.AtMostOnce()); + mocker.GetMock().Verify( + c => c.AddMany(It.Is>(e => e.Count() == fakeEpisodes.Episodes.Count)), Times.Once()); + mocker.GetMock().Verify(c => c.UpdateMany(It.Is>(e => e.Count() == 0)), + Times.AtMostOnce()); mocker.VerifyAllMocks(); } @@ -125,7 +130,7 @@ namespace NzbDrone.Core.Test const int seriesId = 71663; var fakeEpisodes = Builder.CreateNew() .With(c => c.Episodes = new List(Builder.CreateListOfSize(5).Build()) - ).With(c => c.Id = seriesId).Build(); + ).With(c => c.Id = seriesId).Build(); var fakeSeries = Builder.CreateNew().With(c => c.SeriesId = seriesId).Build(); @@ -144,22 +149,106 @@ namespace NzbDrone.Core.Test mocker.Resolve().RefreshEpisodeInfo(fakeSeries); //Assert - mocker.GetMock().Verify(c => c.AddMany(It.Is>(e => e.Count() == 0)), Times.AtMostOnce()); - mocker.GetMock().Verify(c => c.UpdateMany(It.Is>(e => e.Count() == fakeEpisodes.Episodes.Count)), Times.Once()); + mocker.GetMock().Verify(c => c.AddMany(It.Is>(e => e.Count() == 0)), + Times.AtMostOnce()); + mocker.GetMock().Verify( + c => c.UpdateMany(It.Is>(e => e.Count() == fakeEpisodes.Episodes.Count)), + Times.Once()); mocker.VerifyAllMocks(); } + [Test] + public void should_try_to_get_existing_episode_using_tvdbid_first() + { + const int seriesId = 71663; + var fakeEpisodes = Builder.CreateNew() + .With(c => c.Id = seriesId) + .With(c => c.Episodes = new List( + Builder.CreateListOfSize(1) + .WhereAll().Have(g => g.Id = 99) + .Build()) + ) + .Build(); + + var fakeSeries = Builder.CreateNew().With(c => c.SeriesId = seriesId).Build(); + + + var mocker = new AutoMoqer(); + + var repo = MockLib.GetEmptyRepository(); + repo.Add( + Builder.CreateNew().With(c => c.TvDbEpisodeId = fakeEpisodes.Episodes[0].Id).Build()); + mocker.SetConstant(repo); + + mocker.GetMock(MockBehavior.Strict) + .Setup(c => c.GetSeries(seriesId, true)) + .Returns(fakeEpisodes); + + //Act + mocker.Resolve().RefreshEpisodeInfo(fakeSeries); + + //Assert + mocker.VerifyAllMocks(); + Assert.Count(1, repo.All()); + } + + [Test] + public void should_try_to_get_existing_episode_using_tvdbid_first_then_season_episode() + { + const int seriesId = 71663; + var fakeEpisodes = Builder.CreateNew() + .With(c => c.Id = seriesId) + .With(c => c.Episodes = new List{ + Builder.CreateNew() + .With(g => g.Id = 99) + .With(g => g.SeasonNumber = 4) + .With(g => g.EpisodeNumber = 15) + .With(g=>g.SeriesId = seriesId) + .Build() + }) + .Build(); + + var localEpisode = Builder.CreateNew() + .With(c => c.SeriesId = seriesId) + .With(c => c.SeasonNumber = 4) + .With(c => c.EpisodeNumber = 15) + .Build(); + + + var fakeSeries = Builder.CreateNew().With(c => c.SeriesId = seriesId).Build(); + + + var mocker = new AutoMoqer(); + + var repo = MockLib.GetEmptyRepository(); + repo.Add(localEpisode); + mocker.SetConstant(repo); + + mocker.GetMock(MockBehavior.Strict) + .Setup(c => c.GetSeries(seriesId, true)) + .Returns(fakeEpisodes); + + //Act + mocker.Resolve().RefreshEpisodeInfo(fakeSeries); + + //Assert + mocker.VerifyAllMocks(); + Assert.Count(1, repo.All()); + } + + [Test] public void existing_episodes_keep_their_episodeId_file_id() { const int seriesId = 71663; var faketvDbResponse = Builder.CreateNew() .With(c => c.Episodes = new List(Builder.CreateListOfSize(5).Build()) - ).With(c => c.Id = seriesId).Build(); + ).With(c => c.Id = seriesId).Build(); var fakeSeries = Builder.CreateNew().With(c => c.SeriesId = seriesId).Build(); - var fakeEpisode = Builder.CreateNew().With(c => c.EpisodeFileId = 69).And(c => c.EpisodeId = 99).Build(); + var fakeEpisode = + Builder.CreateNew().With(c => c.EpisodeFileId = 69).And(c => c.EpisodeId = 99).Build(); var mocker = new AutoMoqer(); @@ -178,27 +267,28 @@ namespace NzbDrone.Core.Test .Returns(faketvDbResponse.Episodes.Count) .Callback>(r => updatedEpisodes = r); - - - //Act mocker.Resolve().RefreshEpisodeInfo(fakeSeries); //Assert - mocker.GetMock().Verify(c => c.AddMany(It.Is>(e => e.Count() == 0)), Times.AtMostOnce()); - mocker.GetMock().Verify(c => c.UpdateMany(It.Is>(e => e.Count() == faketvDbResponse.Episodes.Count)), Times.Once()); - mocker.GetMock().Verify(c => c.UpdateMany(It.Is>(e => e.Where(g => g.EpisodeFileId == 69).Count() == faketvDbResponse.Episodes.Count)), Times.Once()); + mocker.GetMock().Verify(c => c.AddMany(It.Is>(e => e.Count() == 0)), + Times.AtMostOnce()); + mocker.GetMock().Verify( + c => c.UpdateMany(It.Is>(e => e.Count() == faketvDbResponse.Episodes.Count)), + Times.Once()); + mocker.GetMock().Verify( + c => + c.UpdateMany( + It.Is>( + e => e.Where(g => g.EpisodeFileId == 69).Count() == faketvDbResponse.Episodes.Count)), + Times.Once()); Assert.Count(faketvDbResponse.Episodes.Count, updatedEpisodes); - Assert.ForAll( updatedEpisodes, c=> Assert.AreEqual(99,c.EpisodeId )); - Assert.ForAll( updatedEpisodes, c=> Assert.AreEqual(69,c.EpisodeFileId )); - - + Assert.ForAll(updatedEpisodes, c => Assert.AreEqual(99, c.EpisodeId)); + Assert.ForAll(updatedEpisodes, c => Assert.AreEqual(69, c.EpisodeFileId)); } - - [Test] [Explicit] public void Add_daily_show_episodes() @@ -219,8 +309,5 @@ namespace NzbDrone.Core.Test var episodes = episodeProvider.GetEpisodeBySeries(tvDbSeriesId); Assert.IsNotEmpty(episodes); } - - - } -} \ No newline at end of file +} \ No newline at end of file diff --git a/NzbDrone.Core/Providers/EpisodeProvider.cs b/NzbDrone.Core/Providers/EpisodeProvider.cs index bbb93628090c1049da453005ac39b4590a60d138..05f3d33ab49f6061bd2bf91e9113999e1993c6d9 100644 GIT binary patch delta 272 zcmY+9u};H45JbB)6c*HslXdb3NY>QKm!u z6LoAQ6tp{fZ)P|5zYpt`sHxI=wK+Z(wGR-EDQZgA0p1|1-@B zn^>JpwdN2p4=oQfn&p1j&aMB~4*rkvQ~Fc~BcaBVq_w(AKiOfr&W_Ku-WS0J626R} Sci%r;2UFJda-hG)o1-oDyI_+5 delta 39 vcmez7x66A&2md4ivB~^`-0Z0ZnZ@}jsgo51ttKmricQ`i5WiVkC|VQ%8Kex@ From 18a20ff1630220f4fcd71727d165b8a1ad7da638 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sat, 28 May 2011 23:58:24 -0700 Subject: [PATCH 4/4] Some performance tweaks to speed up episode list view. --- NzbDrone.Core/Repository/Episode.cs | 8 ++++--- NzbDrone.Web/Controllers/SeriesController.cs | 11 +--------- NzbDrone.Web/NzbDrone.Web.csproj | 3 --- NzbDrone.Web/Views/Series/Details.cshtml | 22 +++++--------------- 4 files changed, 11 insertions(+), 33 deletions(-) diff --git a/NzbDrone.Core/Repository/Episode.cs b/NzbDrone.Core/Repository/Episode.cs index 06a04f2b4..a7b6bd0cd 100644 --- a/NzbDrone.Core/Repository/Episode.cs +++ b/NzbDrone.Core/Repository/Episode.cs @@ -49,15 +49,17 @@ namespace NzbDrone.Core.Repository { get { - if (Ignored || (Season != null && !Season.Monitored)) return EpisodeStatusType.Ignored; + if (EpisodeFileId != 0) return EpisodeStatusType.Ready; + + var season = Season; + + if (Ignored || (season != null && !season.Monitored)) return EpisodeStatusType.Ignored; if (GrabDate != null && GrabDate.Value.AddDays(1) >= DateTime.Now) { return EpisodeStatusType.Downloading; } - if (EpisodeFileId != 0) return EpisodeStatusType.Ready; - if (AirDate.Date.Year > 1900 && DateTime.Now.Date >= AirDate.Date) { return EpisodeStatusType.Missing; diff --git a/NzbDrone.Web/Controllers/SeriesController.cs b/NzbDrone.Web/Controllers/SeriesController.cs index b2a21a837..0d78d8f00 100644 --- a/NzbDrone.Web/Controllers/SeriesController.cs +++ b/NzbDrone.Web/Controllers/SeriesController.cs @@ -55,15 +55,6 @@ namespace NzbDrone.Web.Controllers return RedirectToAction("Index"); } - public ActionResult LoadEpisodes(int seriesId) - { - _episodeProvider.RefreshEpisodeInfo(seriesId); - return RedirectToAction("Details", new - { - seriesId - }); - } - public ActionResult SeasonEditor(int seriesId) { var model = @@ -149,7 +140,7 @@ namespace NzbDrone.Web.Controllers return String.Empty; //Return the path relative to the Series' Folder - return file.Path.Replace(file.Series.Path, "").Trim(Path.DirectorySeparatorChar); + return file.Path; } public ActionResult SearchForSeries(string seriesName) diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index b5034d831..6599bccbe 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -871,9 +871,6 @@ - - -