mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-27 11:21:43 +02:00
Added WEBDL 1080p
New: WEBDL 720p and 1080p are now separated
This commit is contained in:
parent
b40c6ba7b8
commit
09665c2920
@ -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[] { "(<a href=\"http://www.newzbin.com/browse/post/6076286/nzb/\">NZB</a>)", 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 }
|
||||
};
|
||||
|
@ -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 }
|
||||
};
|
||||
|
||||
|
@ -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 }
|
||||
};
|
||||
|
||||
|
@ -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<QualityProvider>().Setup(s => s.Get(It.IsAny<int>())).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<UpgradePossibleSpecification>().IsSatisfiedBy(_episode);
|
||||
|
@ -91,7 +91,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
||||
var file = Builder<EpisodeFile>.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<DownloadProvider>()
|
||||
.Setup(s => s.GetDownloadTitle(It.Is<EpisodeParseResult>(e => e.Quality == new QualityModel{ Quality = QualityTypes.WEBDL, Proper = false })))
|
||||
.Setup(s => s.GetDownloadTitle(It.Is<EpisodeParseResult>(e => e.Quality == new QualityModel{ Quality = QualityTypes.WEBDL720p, Proper = false })))
|
||||
.Returns(message);
|
||||
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
|
@ -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")]
|
||||
|
@ -29,26 +29,24 @@ namespace NzbDrone.Core.Test.ProviderTests
|
||||
//Assert
|
||||
var types = Mocker.Resolve<QualityTypeProvider>().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<QualityType>.CreateNew()
|
||||
.Build();
|
||||
|
||||
db.Insert(fakeQualityType);
|
||||
db.Insert(new QualityType { QualityTypeId = 1, Name = "SDTV", MinSize = 0, MaxSize = 100 });
|
||||
|
||||
//Act
|
||||
Mocker.Resolve<QualityTypeProvider>().SetupDefault();
|
||||
@ -56,7 +54,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
||||
//Assert
|
||||
var types = Mocker.Resolve<QualityTypeProvider>().All();
|
||||
|
||||
types.Should().HaveCount(1);
|
||||
types.Should().HaveCount(7);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -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}
|
||||
};
|
||||
|
@ -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"))
|
||||
|
@ -68,7 +68,7 @@ namespace NzbDrone.Core.Providers
|
||||
var hd = new QualityProfile
|
||||
{
|
||||
Name = "HD",
|
||||
Allowed = new List<QualityTypes> { QualityTypes.HDTV, QualityTypes.WEBDL, QualityTypes.Bluray720p },
|
||||
Allowed = new List<QualityTypes> { QualityTypes.HDTV, QualityTypes.WEBDL720p, QualityTypes.Bluray720p },
|
||||
Cutoff = QualityTypes.HDTV
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<QualityTypes> All()
|
||||
{
|
||||
@ -108,7 +109,8 @@ namespace NzbDrone.Core.Repository.Quality
|
||||
SDTV,
|
||||
DVD,
|
||||
HDTV,
|
||||
WEBDL,
|
||||
WEBDL720p,
|
||||
WEBDL1080p,
|
||||
Bluray720p,
|
||||
Bluray1080p
|
||||
};
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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; }
|
||||
}
|
||||
|
@ -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; }
|
||||
|
@ -64,10 +64,10 @@
|
||||
</span>MB
|
||||
</div>
|
||||
<div class="slider-container">
|
||||
<b>WEBDL</b>
|
||||
<b>WEBDL-720p</b>
|
||||
<div id="webdl-slider" class="slider">
|
||||
</div>
|
||||
@Html.HiddenFor(m => m.WebdlMaxSize, new { @class = "slider-value" })
|
||||
@Html.HiddenFor(m => m.Webdl720pMaxSize, new { @class = "slider-value" })
|
||||
30 minute size: <span class="30-minute"></span>MB | 60 minute size: <span class="60-minute">
|
||||
</span>MB
|
||||
</div>
|
||||
@ -79,6 +79,14 @@
|
||||
30 minute size: <span class="30-minute"></span>MB | 60 minute size: <span class="60-minute">
|
||||
</span>MB
|
||||
</div>
|
||||
<div class="slider-container">
|
||||
<b>WEBDL-1080p</b>
|
||||
<div id="webdl-slider" class="slider">
|
||||
</div>
|
||||
@Html.HiddenFor(m => m.Webdl1080pMaxSize, new { @class = "slider-value" })
|
||||
30 minute size: <span class="30-minute"></span>MB | 60 minute size: <span class="60-minute">
|
||||
</span>MB
|
||||
</div>
|
||||
<div class="slider-container">
|
||||
<b>Bluray 1080p</b>
|
||||
<div id="bluray1080p-slider" class="slider">
|
||||
@ -96,9 +104,9 @@
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
<script type="text/javascript">
|
||||
@Html.IncludeScript("NzbDrone/qualitySettings.js")
|
||||
@Html.IncludeScript("NzbDrone/qualitySettings.js")
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
setupSliders();
|
||||
});
|
||||
|
@ -29,10 +29,12 @@
|
||||
@Html.LabelFor(m => m.Dvd)
|
||||
@Html.CheckBoxFor(m => m.Hdtv, new { @class = "quality-selectee", data_quality_id = Model.HdtvId })
|
||||
@Html.LabelFor(m => m.Hdtv)
|
||||
@Html.CheckBoxFor(m => m.Webdl, new { @class = "quality-selectee", data_quality_id = Model.WebdlId })
|
||||
@Html.LabelFor(m => m.Webdl)
|
||||
@Html.CheckBoxFor(m => m.Bluray720p, new { @class = "quality-selectee", data_quality_id = Model.Bluray720p })
|
||||
@Html.CheckBoxFor(m => m.Webdl720p, new { @class = "quality-selectee", data_quality_id = Model.Webdl720pId })
|
||||
@Html.LabelFor(m => m.Webdl720p)
|
||||
@Html.CheckBoxFor(m => m.Bluray720p, new { @class = "quality-selectee", data_quality_id = Model.Bluray720pId })
|
||||
@Html.LabelFor(m => m.Bluray720p)
|
||||
@Html.CheckBoxFor(m => m.Webdl1080p, new { @class = "quality-selectee", data_quality_id = Model.Webdl1080pId })
|
||||
@Html.LabelFor(m => m.Webdl1080p)
|
||||
@Html.CheckBoxFor(m => m.Bluray1080p, new { @class = "quality-selectee", data_quality_id = Model.Bluray1080pId })
|
||||
@Html.LabelFor(m => m.Bluray1080p)
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user