diff --git a/NzbDrone.Core.Test/ParserFixture/QualityParserTests.cs b/NzbDrone.Core.Test/ParserFixture/QualityParserTests.cs index 23395c670..beadf999a 100644 --- a/NzbDrone.Core.Test/ParserFixture/QualityParserTests.cs +++ b/NzbDrone.Core.Test/ParserFixture/QualityParserTests.cs @@ -29,7 +29,7 @@ namespace NzbDrone.Core.Test.ParserFixture new object[] { "The.Girls.Next.Door.S03E06.DVD.Rip.XviD-WiDE", QualityTypes.DVD, false }, new object[] { "The.Girls.Next.Door.S03E06.HDTV-WiDE", QualityTypes.SDTV, false }, new object[] { "Degrassi.S10E27.WS.DSR.XviD-2HD", QualityTypes.SDTV, false }, - new object[] { "Sonny.With.a.Chance.S02E15.720p.WEB-DL.DD5.1.H.264-SURFER", QualityTypes.WEBDL, false }, + new object[] { "Sonny.With.a.Chance.S02E15.720p.WEB-DL.DD5.1.H.264-SURFER", QualityTypes.WEBDL720p, false }, new object[] { "Sonny.With.a.Chance.S02E15.720p", QualityTypes.HDTV, false }, new object[] { "Sonny.With.a.Chance.S02E15.mkv", QualityTypes.HDTV, false }, new object[] { "Sonny.With.a.Chance.S02E15.avi", QualityTypes.SDTV, false }, @@ -40,13 +40,13 @@ namespace NzbDrone.Core.Test.ParserFixture new object[] { "Chuck - S22E03 - MoneyBART - HD TV.mkv", QualityTypes.HDTV, false }, new object[] { "Chuck - S01E03 - Come Fly With Me - 720p BluRay.mkv", QualityTypes.Bluray720p, false }, new object[] { "Chuck - S01E03 - Come Fly With Me - 1080p BluRay.mkv", QualityTypes.Bluray1080p, false }, - new object[] { "Chuck - S11E06 - D-Yikes! - 720p WEB-DL.mkv", QualityTypes.WEBDL, false }, + new object[] { "Chuck - S11E06 - D-Yikes! - 720p WEB-DL.mkv", QualityTypes.WEBDL720p, false }, new object[] { "WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD.avi", QualityTypes.DVD, false }, new object[] { "WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD.avi", QualityTypes.DVD, false }, new object[] { "Law & Order: Special Victims Unit - 11x11 - Quickie", QualityTypes.Unknown, false }, new object[] { "(NZB)", QualityTypes.Unknown, false }, new object[] { "S07E23 - [HDTV].mkv ", QualityTypes.HDTV, false }, - new object[] { "S07E23 - [WEBDL].mkv ", QualityTypes.WEBDL, false }, + new object[] { "S07E23 - [WEBDL].mkv ", QualityTypes.WEBDL720p, false }, new object[] { "S07E23.mkv ", QualityTypes.HDTV, false }, new object[] { "S07E23 .avi ", QualityTypes.SDTV, false }, new object[] { "WEEDS.S03E01-06.DUAL.XviD.Bluray.AC3.-HELLYWOOD.avi", QualityTypes.DVD, false }, @@ -61,11 +61,15 @@ namespace NzbDrone.Core.Test.ParserFixture new object[] { "Pawn Stars S04E87 REPACK 720p HDTV x264 aAF", QualityTypes.HDTV, true }, new object[] { "The Real Housewives of Vancouver S01E04 DSR x264 2HD", QualityTypes.SDTV, false }, new object[] { "Vanguard S01E04 Mexicos Death Train DSR x264 MiNDTHEGAP", QualityTypes.SDTV, false }, - new object[] { "Vanguard S01E04 Mexicos Death Train 720 WEB DL", QualityTypes.WEBDL, false }, - new object[] { "Hawaii Five 0 S02E21 720p WEB DL DD5 1 H 264", QualityTypes.WEBDL, false }, - new object[] { "Castle S04E22 720p WEB DL DD5 1 H 264 NFHD", QualityTypes.WEBDL, false }, - new object[] { "Fringe S04E22 720p WEB-DL DD5.1 H264-EbP.mkv", QualityTypes.WEBDL, false }, - new object[] { "Fringe.S04E22.720p.WEB.DL.DD5.1.H264-EbP", QualityTypes.WEBDL, false } + new object[] { "Vanguard S01E04 Mexicos Death Train 720 WEB DL", QualityTypes.WEBDL720p, false }, + new object[] { "Hawaii Five 0 S02E21 720p WEB DL DD5 1 H 264", QualityTypes.WEBDL720p, false }, + new object[] { "Castle S04E22 720p WEB DL DD5 1 H 264 NFHD", QualityTypes.WEBDL720p, false }, + new object[] { "Fringe S04E22 720p WEB-DL DD5.1 H264-EbP.mkv", QualityTypes.WEBDL720p, false }, + new object[] { "CSI NY S09E03 1080p WEB DL DD5 1 H264 NFHD", QualityTypes.WEBDL1080p, false }, + new object[] { "Two and a Half Men S10E03 1080p WEB DL DD5 1 H 264 NFHD", QualityTypes.WEBDL1080p, false }, + new object[] { "Criminal.Minds.S08E01.1080p.WEB-DL.DD5.1.H264-NFHD", QualityTypes.WEBDL1080p, false }, + new object[] { "Its.Always.Sunny.in.Philadelphia.S08E01.1080p.WEB-DL.proper.AAC2.0.H.264", QualityTypes.WEBDL1080p, true }, + new object[] { "Two and a Half Men S10E03 1080p WEB DL DD5 1 H 264 REPACK NFHD", QualityTypes.WEBDL1080p, true }, }; public static object[] SelfQualityParserCases = @@ -73,7 +77,7 @@ namespace NzbDrone.Core.Test.ParserFixture new object[] { QualityTypes.SDTV }, new object[] { QualityTypes.DVD }, new object[] { QualityTypes.HDTV }, - new object[] { QualityTypes.WEBDL }, + new object[] { QualityTypes.WEBDL720p }, new object[] { QualityTypes.Bluray720p }, new object[] { QualityTypes.Bluray1080p } }; diff --git a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/QualityAllowedByProfileSpecificationFixtrue.cs b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/QualityAllowedByProfileSpecificationFixtrue.cs index 3af218337..433af761b 100644 --- a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/QualityAllowedByProfileSpecificationFixtrue.cs +++ b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/QualityAllowedByProfileSpecificationFixtrue.cs @@ -30,7 +30,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests public static object[] DeniedTestCases = { new object[] { QualityTypes.SDTV }, - new object[] { QualityTypes.WEBDL }, + new object[] { QualityTypes.WEBDL720p }, new object[] { QualityTypes.Bluray720p } }; diff --git a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs index 7e7e9c482..07506badb 100644 --- a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs @@ -17,12 +17,12 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests public static object[] IsUpgradeTestCases = { new object[] { QualityTypes.SDTV, false, QualityTypes.SDTV, true, QualityTypes.SDTV, true }, - new object[] { QualityTypes.WEBDL, false, QualityTypes.WEBDL, true, QualityTypes.WEBDL, true }, + new object[] { QualityTypes.WEBDL720p, false, QualityTypes.WEBDL720p, true, QualityTypes.WEBDL720p, true }, new object[] { QualityTypes.SDTV, false, QualityTypes.SDTV, false, QualityTypes.SDTV, false }, new object[] { QualityTypes.SDTV, false, QualityTypes.DVD, true, QualityTypes.SDTV, false }, - new object[] { QualityTypes.WEBDL, false, QualityTypes.HDTV, true, QualityTypes.Bluray720p, false }, - new object[] { QualityTypes.WEBDL, false, QualityTypes.HDTV, true, QualityTypes.WEBDL, false }, - new object[] { QualityTypes.WEBDL, false, QualityTypes.WEBDL, false, QualityTypes.WEBDL, false }, + new object[] { QualityTypes.WEBDL720p, false, QualityTypes.HDTV, true, QualityTypes.Bluray720p, false }, + new object[] { QualityTypes.WEBDL720p, false, QualityTypes.HDTV, true, QualityTypes.WEBDL720p, false }, + new object[] { QualityTypes.WEBDL720p, false, QualityTypes.WEBDL720p, false, QualityTypes.WEBDL720p, false }, new object[] { QualityTypes.SDTV, false, QualityTypes.SDTV, true, QualityTypes.SDTV, true } }; diff --git a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/UpgradePossibleSpecificationFixture.cs b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/UpgradePossibleSpecificationFixture.cs index b6e758749..f5cc36457 100644 --- a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/UpgradePossibleSpecificationFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/UpgradePossibleSpecificationFixture.cs @@ -19,7 +19,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests { private void WithWebdlCutoff() { - var profile = new QualityProfile { Cutoff = QualityTypes.WEBDL }; + var profile = new QualityProfile { Cutoff = QualityTypes.WEBDL720p }; Mocker.GetMock().Setup(s => s.Get(It.IsAny())).Returns(profile); } @@ -77,7 +77,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests { WithWebdlCutoff(); - _episodeFile.Quality = QualityTypes.WEBDL; + _episodeFile.Quality = QualityTypes.WEBDL720p; //Act bool result = Mocker.Resolve().IsSatisfiedBy(_episode); diff --git a/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/MoveEpisodeFileFixture.cs b/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/MoveEpisodeFileFixture.cs index 68d9ddf28..8157533f0 100644 --- a/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/MoveEpisodeFileFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/MoveEpisodeFileFixture.cs @@ -91,7 +91,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests var file = Builder.CreateNew() .With(f => f.SeriesId = fakeSeries.SeriesId) .With(f => f.Path = currentFilename) - .With(f => f.Quality = QualityTypes.WEBDL) + .With(f => f.Quality = QualityTypes.WEBDL720p) .With(f => f.Proper = false) .Build(); @@ -112,7 +112,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests .Returns(fi); Mocker.GetMock() - .Setup(s => s.GetDownloadTitle(It.Is(e => e.Quality == new QualityModel{ Quality = QualityTypes.WEBDL, Proper = false }))) + .Setup(s => s.GetDownloadTitle(It.Is(e => e.Quality == new QualityModel{ Quality = QualityTypes.WEBDL720p, Proper = false }))) .Returns(message); Mocker.GetMock() diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/QueueFixture.cs b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/QueueFixture.cs index 6a9cb6f3e..7ae9fb0ba 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/QueueFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/QueueFixture.cs @@ -212,7 +212,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.SabProviderTests new object[] { 1, new[] { 5 }, "30 RocK", QualityTypes.HDTV, false }, //Same Series, same quality new object[] { 1, new[] { 5, 6 }, "30 RocK", QualityTypes.HDTV, false }, //Same Series, same quality, one different episode new object[] { 1, new[] { 5, 6 }, "30 RocK", QualityTypes.HDTV, false }, //Same Series, same quality, one different episode - new object[] { 4, new[] { 8 }, "Parks and Recreation", QualityTypes.WEBDL }, false, //Same Series, same quality + new object[] { 4, new[] { 8 }, "Parks and Recreation", QualityTypes.WEBDL720p }, false, //Same Series, same quality }; [Test, TestCaseSource("LowerQualityCases")] diff --git a/NzbDrone.Core.Test/ProviderTests/QualityTypeProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/QualityTypeProviderTest.cs index f9fc4e000..aa77d5911 100644 --- a/NzbDrone.Core.Test/ProviderTests/QualityTypeProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/QualityTypeProviderTest.cs @@ -29,26 +29,24 @@ namespace NzbDrone.Core.Test.ProviderTests //Assert var types = Mocker.Resolve().All(); - types.Should().HaveCount(6); + types.Should().HaveCount(7); types.Should().Contain(e => e.Name == "SDTV" && e.QualityTypeId == 1); types.Should().Contain(e => e.Name == "DVD" && e.QualityTypeId == 2); types.Should().Contain(e => e.Name == "HDTV" && e.QualityTypeId == 4); - types.Should().Contain(e => e.Name == "WEBDL" && e.QualityTypeId == 5); + types.Should().Contain(e => e.Name == "WEBDL720p" && e.QualityTypeId == 5); + types.Should().Contain(e => e.Name == "WEBDL1080p" && e.QualityTypeId == 3); types.Should().Contain(e => e.Name == "Bluray720p" && e.QualityTypeId == 6); types.Should().Contain(e => e.Name == "Bluray1080p" && e.QualityTypeId == 7); } [Test] - public void SetupDefault_already_exists() + public void SetupDefault_already_exists_should_insert_missing() { var db = TestDbHelper.GetEmptyDatabase(); Mocker.SetConstant(db); - var fakeQualityType = Builder.CreateNew() - .Build(); - - db.Insert(fakeQualityType); + db.Insert(new QualityType { QualityTypeId = 1, Name = "SDTV", MinSize = 0, MaxSize = 100 }); //Act Mocker.Resolve().SetupDefault(); @@ -56,7 +54,7 @@ namespace NzbDrone.Core.Test.ProviderTests //Assert var types = Mocker.Resolve().All(); - types.Should().HaveCount(1); + types.Should().HaveCount(7); } [Test] diff --git a/NzbDrone.Core.Test/QualityTypesTest.cs b/NzbDrone.Core.Test/QualityTypesTest.cs index 6208bef18..19b282b5b 100644 --- a/NzbDrone.Core.Test/QualityTypesTest.cs +++ b/NzbDrone.Core.Test/QualityTypesTest.cs @@ -18,7 +18,7 @@ namespace NzbDrone.Core.Test new object[] {1, QualityTypes.SDTV}, new object[] {2, QualityTypes.DVD}, new object[] {4, QualityTypes.HDTV}, - new object[] {5, QualityTypes.WEBDL}, + new object[] {5, QualityTypes.WEBDL720p}, new object[] {6, QualityTypes.Bluray720p}, new object[] {7, QualityTypes.Bluray1080p} }; @@ -28,7 +28,7 @@ namespace NzbDrone.Core.Test new object[] {QualityTypes.SDTV, 1}, new object[] {QualityTypes.DVD, 2}, new object[] {QualityTypes.HDTV, 4}, - new object[] {QualityTypes.WEBDL, 5}, + new object[] {QualityTypes.WEBDL720p, 5}, new object[] {QualityTypes.Bluray720p, 6}, new object[] {QualityTypes.Bluray1080p, 7} }; diff --git a/NzbDrone.Core/Parser.cs b/NzbDrone.Core/Parser.cs index 2d1c1399e..8d89a821c 100644 --- a/NzbDrone.Core/Parser.cs +++ b/NzbDrone.Core/Parser.cs @@ -297,7 +297,12 @@ namespace NzbDrone.Core } if (normalizedName.Contains("webdl")) { - result.Quality = QualityTypes.WEBDL; + if (normalizedName.Contains("1080p")) + { + result.Quality = QualityTypes.WEBDL1080p; + return result; + } + result.Quality = QualityTypes.WEBDL720p; return result; } if (normalizedName.Contains("x264") || normalizedName.Contains("h264") || normalizedName.Contains("720p")) diff --git a/NzbDrone.Core/Providers/QualityProvider.cs b/NzbDrone.Core/Providers/QualityProvider.cs index 33660adbf..5222b22ae 100644 --- a/NzbDrone.Core/Providers/QualityProvider.cs +++ b/NzbDrone.Core/Providers/QualityProvider.cs @@ -68,7 +68,7 @@ namespace NzbDrone.Core.Providers var hd = new QualityProfile { Name = "HD", - Allowed = new List { QualityTypes.HDTV, QualityTypes.WEBDL, QualityTypes.Bluray720p }, + Allowed = new List { QualityTypes.HDTV, QualityTypes.WEBDL720p, QualityTypes.Bluray720p }, Cutoff = QualityTypes.HDTV }; diff --git a/NzbDrone.Core/Providers/QualityTypeProvider.cs b/NzbDrone.Core/Providers/QualityTypeProvider.cs index 9f8793213..bec9b7843 100644 --- a/NzbDrone.Core/Providers/QualityTypeProvider.cs +++ b/NzbDrone.Core/Providers/QualityTypeProvider.cs @@ -54,8 +54,7 @@ namespace NzbDrone.Core.Providers public virtual void SetupDefault() { - if (All().Count != 0) - return; + var inDb = All(); Logger.Debug("Setting up default quality types"); @@ -63,11 +62,18 @@ namespace NzbDrone.Core.Providers qualityTypes.Add(new QualityType { QualityTypeId = 1, Name = "SDTV", MinSize = 0, MaxSize = 100 }); qualityTypes.Add(new QualityType { QualityTypeId = 2, Name = "DVD", MinSize = 0, MaxSize = 100 }); qualityTypes.Add(new QualityType { QualityTypeId = 4, Name = "HDTV", MinSize = 0, MaxSize = 100 }); - qualityTypes.Add(new QualityType { QualityTypeId = 5, Name = "WEBDL", MinSize = 0, MaxSize = 100 }); + qualityTypes.Add(new QualityType { QualityTypeId = 5, Name = "WEBDL720p", MinSize = 0, MaxSize = 100 }); + qualityTypes.Add(new QualityType { QualityTypeId = 3, Name = "WEBDL1080p", MinSize = 0, MaxSize = 100 }); qualityTypes.Add(new QualityType { QualityTypeId = 6, Name = "Bluray720p", MinSize = 0, MaxSize = 100 }); qualityTypes.Add(new QualityType { QualityTypeId = 7, Name = "Bluray1080p", MinSize = 0, MaxSize = 100 }); - _database.InsertMany(qualityTypes); + foreach(var qualityType in qualityTypes) + { + var db = inDb.SingleOrDefault(s => s.QualityTypeId == qualityType.QualityTypeId); + + if (db == null) + _database.Insert(qualityType); + } } } } diff --git a/NzbDrone.Core/Repository/Quality/QualityTypes.cs b/NzbDrone.Core/Repository/Quality/QualityTypes.cs index 6170adc66..e77c3f2cb 100644 --- a/NzbDrone.Core/Repository/Quality/QualityTypes.cs +++ b/NzbDrone.Core/Repository/Quality/QualityTypes.cs @@ -96,9 +96,10 @@ namespace NzbDrone.Core.Repository.Quality public static QualityTypes SDTV = new QualityTypes {Id = 1, Name = "SDTV", Weight = 1}; public static QualityTypes DVD = new QualityTypes { Id = 2, Name = "DVD", Weight = 2 }; public static QualityTypes HDTV = new QualityTypes { Id = 4, Name = "HDTV", Weight = 4 }; - public static QualityTypes WEBDL = new QualityTypes { Id = 5, Name = "WEBDL", Weight = 5 }; + public static QualityTypes WEBDL720p = new QualityTypes { Id = 5, Name = "WEBDL-720p", Weight = 5 }; + public static QualityTypes WEBDL1080p = new QualityTypes { Id = 3, Name = "WEBDL-1080p", Weight = 7 }; public static QualityTypes Bluray720p = new QualityTypes { Id = 6, Name = "Bluray720p", Weight = 6 }; - public static QualityTypes Bluray1080p = new QualityTypes { Id = 7, Name = "Bluray1080p", Weight = 7 }; + public static QualityTypes Bluray1080p = new QualityTypes { Id = 7, Name = "Bluray1080p", Weight = 8 }; public static List All() { @@ -108,7 +109,8 @@ namespace NzbDrone.Core.Repository.Quality SDTV, DVD, HDTV, - WEBDL, + WEBDL720p, + WEBDL1080p, Bluray720p, Bluray1080p }; diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 2bc01dc2a..606eb158d 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -167,7 +167,8 @@ namespace NzbDrone.Web.Controllers SdtvMaxSize = qualityTypesFromDb.Single(q => q.QualityTypeId == 1).MaxSize, DvdMaxSize = qualityTypesFromDb.Single(q => q.QualityTypeId == 2).MaxSize, HdtvMaxSize = qualityTypesFromDb.Single(q => q.QualityTypeId == 4).MaxSize, - WebdlMaxSize = qualityTypesFromDb.Single(q => q.QualityTypeId == 5).MaxSize, + Webdl720pMaxSize = qualityTypesFromDb.Single(q => q.QualityTypeId == 5).MaxSize, + Webdl1080pMaxSize = qualityTypesFromDb.Single(q => q.QualityTypeId == 3).MaxSize, Bluray720pMaxSize = qualityTypesFromDb.Single(q => q.QualityTypeId == 6).MaxSize, Bluray1080pMaxSize = qualityTypesFromDb.Single(q => q.QualityTypeId == 7).MaxSize }; @@ -282,7 +283,8 @@ namespace NzbDrone.Web.Controllers model.Sdtv = profile.Allowed.Contains(QualityTypes.SDTV); model.Dvd = profile.Allowed.Contains(QualityTypes.DVD); model.Hdtv = profile.Allowed.Contains(QualityTypes.HDTV); - model.Webdl = profile.Allowed.Contains(QualityTypes.WEBDL); + model.Webdl720p = profile.Allowed.Contains(QualityTypes.WEBDL720p); + model.Webdl1080p = profile.Allowed.Contains(QualityTypes.WEBDL1080p); model.Bluray720p = profile.Allowed.Contains(QualityTypes.Bluray720p); model.Bluray1080p = profile.Allowed.Contains(QualityTypes.Bluray1080p); model.Cutoff = (int)profile.Cutoff; @@ -290,7 +292,8 @@ namespace NzbDrone.Web.Controllers model.SdtvId = QualityTypes.SDTV.Id; model.DvdId = QualityTypes.DVD.Id; model.HdtvId = QualityTypes.HDTV.Id; - model.WebdlId = QualityTypes.WEBDL.Id; + model.Webdl720pId = QualityTypes.WEBDL720p.Id; + model.Webdl1080pId = QualityTypes.WEBDL1080p.Id; model.Bluray720pId = QualityTypes.Bluray720p.Id; model.Bluray1080pId = QualityTypes.Bluray1080p.Id; @@ -494,8 +497,11 @@ namespace NzbDrone.Web.Controllers if (profileModel.Hdtv) profile.Allowed.Add(QualityTypes.HDTV); - if (profileModel.Webdl) - profile.Allowed.Add(QualityTypes.WEBDL); + if (profileModel.Webdl720p) + profile.Allowed.Add(QualityTypes.WEBDL720p); + + if (profileModel.Webdl1080p) + profile.Allowed.Add(QualityTypes.WEBDL1080p); if (profileModel.Bluray720p) profile.Allowed.Add(QualityTypes.Bluray720p); @@ -515,7 +521,8 @@ namespace NzbDrone.Web.Controllers qualityTypesFromDb.Single(q => q.QualityTypeId == 1).MaxSize = data.SdtvMaxSize; qualityTypesFromDb.Single(q => q.QualityTypeId == 2).MaxSize = data.DvdMaxSize; qualityTypesFromDb.Single(q => q.QualityTypeId == 4).MaxSize = data.HdtvMaxSize; - qualityTypesFromDb.Single(q => q.QualityTypeId == 5).MaxSize = data.WebdlMaxSize; + qualityTypesFromDb.Single(q => q.QualityTypeId == 5).MaxSize = data.Webdl720pMaxSize; + qualityTypesFromDb.Single(q => q.QualityTypeId == 3).MaxSize = data.Webdl1080pMaxSize; qualityTypesFromDb.Single(q => q.QualityTypeId == 6).MaxSize = data.Bluray720pMaxSize; qualityTypesFromDb.Single(q => q.QualityTypeId == 7).MaxSize = data.Bluray1080pMaxSize; diff --git a/NzbDrone.Web/Models/QualityModel.cs b/NzbDrone.Web/Models/QualityModel.cs index a0ee8041d..74691d9ee 100644 --- a/NzbDrone.Web/Models/QualityModel.cs +++ b/NzbDrone.Web/Models/QualityModel.cs @@ -18,7 +18,8 @@ namespace NzbDrone.Web.Models public int SdtvMaxSize { get; set; } public int DvdMaxSize { get; set; } public int HdtvMaxSize { get; set; } - public int WebdlMaxSize { get; set; } + public int Webdl720pMaxSize { get; set; } + public int Webdl1080pMaxSize { get; set; } public int Bluray720pMaxSize { get; set; } public int Bluray1080pMaxSize { get; set; } } diff --git a/NzbDrone.Web/Models/QualityProfileModel.cs b/NzbDrone.Web/Models/QualityProfileModel.cs index 4b70bee07..6d27720e0 100644 --- a/NzbDrone.Web/Models/QualityProfileModel.cs +++ b/NzbDrone.Web/Models/QualityProfileModel.cs @@ -36,9 +36,13 @@ namespace NzbDrone.Web.Models public bool Hdtv { get; set; } public int HdtvId { get; set; } - [DisplayName("WEBDL")] - public bool Webdl { get; set; } - public int WebdlId { get; set; } + [DisplayName("WEBDL-720p")] + public bool Webdl720p { get; set; } + public int Webdl720pId { get; set; } + + [DisplayName("WEBDL-1080p")] + public bool Webdl1080p { get; set; } + public int Webdl1080pId { get; set; } [DisplayName("Bluray720p")] public bool Bluray720p { get; set; } diff --git a/NzbDrone.Web/Views/Settings/Quality.cshtml b/NzbDrone.Web/Views/Settings/Quality.cshtml index debbf25b3..e9eb9a75c 100644 --- a/NzbDrone.Web/Views/Settings/Quality.cshtml +++ b/NzbDrone.Web/Views/Settings/Quality.cshtml @@ -64,10 +64,10 @@ MB
- WEBDL + WEBDL-720p
- @Html.HiddenFor(m => m.WebdlMaxSize, new { @class = "slider-value" }) + @Html.HiddenFor(m => m.Webdl720pMaxSize, new { @class = "slider-value" }) 30 minute size: MB | 60 minute size: MB
@@ -79,6 +79,14 @@ 30 minute size: MB | 60 minute size: MB +
+ WEBDL-1080p +
+
+ @Html.HiddenFor(m => m.Webdl1080pMaxSize, new { @class = "slider-value" }) + 30 minute size: MB | 60 minute size: + MB +
Bluray 1080p
@@ -96,9 +104,9 @@
@section Scripts { -