diff --git a/NzbDrone.Core.Test/ParserTest.cs b/NzbDrone.Core.Test/ParserTest.cs index 4fa825297..7f332b1c5 100644 --- a/NzbDrone.Core.Test/ParserTest.cs +++ b/NzbDrone.Core.Test/ParserTest.cs @@ -51,7 +51,8 @@ namespace NzbDrone.Core.Test [Row("Sonny.With.a.Chance.S02E15", QualityTypes.Unknown)] [Row("S01E04 - So Old - Playdate - 720p TV.mkv", QualityTypes.HDTV)] [Row("S22E03 - MoneyBART - HD TV.mkv", QualityTypes.HDTV)] - [Row("S01E03 - Come Fly With Me - 720p BluRay.mkv", QualityTypes.Bluray)] + [Row("S01E03 - Come Fly With Me - 720p BluRay.mkv", QualityTypes.Bluray720)] + [Row("S01E03 - Come Fly With Me - 1080p BluRay.mkv", QualityTypes.Bluray1080)] [Row("S11E06 - D-Yikes! - 720p WEB-DL.mkv", QualityTypes.WEBDL)] public void quality_parse(string path, object quality) { diff --git a/NzbDrone.Core/CentralDispatch.cs b/NzbDrone.Core/CentralDispatch.cs index e88c77a9c..23ef95237 100644 --- a/NzbDrone.Core/CentralDispatch.cs +++ b/NzbDrone.Core/CentralDispatch.cs @@ -33,6 +33,9 @@ namespace NzbDrone.Core Logger.Debug("Binding Ninject's Kernel"); _kernel = new StandardKernel(); + //Store the startup path + _startupPath = AppPath; + //Sqlite string connectionString = String.Format("Data Source={0};Version=3;", Path.Combine(AppPath, "nzbdrone.db")); var dbProvider = ProviderFactory.GetProvider(connectionString, "System.Data.SQLite"); @@ -88,9 +91,6 @@ namespace NzbDrone.Core SetupIndexers(_kernel.Get()); //Setup the default set of indexers on start-up SetupDefaultQualityProfiles(_kernel.Get()); //Setup the default QualityProfiles on start-up - //Store the startup path - _startupPath = AppPath; - //Get the Timers going var config = _kernel.Get(); var timer = _kernel.Get(); @@ -273,142 +273,50 @@ namespace NzbDrone.Core private static void SetupDefaultQualityProfiles(IRepository repository) { - var sdtv = new QualityProfile + var sd = new QualityProfile { - Name = "SDTV", - Allowed = new List { QualityTypes.TV }, + Name = "SD", + Allowed = new List { QualityTypes.TV, QualityTypes.DVD }, Cutoff = QualityTypes.TV }; - var dvd = new QualityProfile + var hd = new QualityProfile { - Name = "DVD SD", - Allowed = new List { QualityTypes.DVD }, - Cutoff = QualityTypes.DVD - }; - - var bdrip = new QualityProfile - { - Name = "BDRip", - Allowed = new List { QualityTypes.BDRip }, - Cutoff = QualityTypes.BDRip - }; - - var hdtv = new QualityProfile - { - Name = "HDTV", - Allowed = new List { QualityTypes.HDTV }, + Name = "HD", + Allowed = new List { QualityTypes.HDTV, QualityTypes.WEBDL, QualityTypes.BDRip, QualityTypes.Bluray720 }, Cutoff = QualityTypes.HDTV }; - var webdl = new QualityProfile - { - Name = "WEBDL", - Allowed = new List { QualityTypes.WEBDL }, - Cutoff = QualityTypes.WEBDL - }; - - var bluray = new QualityProfile - { - Name = "Bluray", - Allowed = new List { QualityTypes.Bluray }, - Cutoff = QualityTypes.Bluray - }; - - //Add or Update SDTV - Logger.Debug(String.Format("Checking for default QualityProfile: {0}", sdtv.Name)); - var sdtvDb = repository.Single(i => i.Name == sdtv.Name); - if (sdtvDb == null) + //Add or Update SD + Logger.Debug(String.Format("Checking for default QualityProfile: {0}", sd.Name)); + var sdDb = repository.Single(i => i.Name == sd.Name); + if (sdDb == null) { - Logger.Debug(String.Format("Adding new default QualityProfile: {0}", sdtv.Name)); - repository.Add(sdtv); + Logger.Debug(String.Format("Adding new default QualityProfile: {0}", sd.Name)); + repository.Add(sd); } else { - Logger.Debug(String.Format("Updating default QualityProfile: {0}", sdtv.Name)); - sdtv.QualityProfileId = sdtvDb.QualityProfileId; - repository.Update(sdtv); + Logger.Debug(String.Format("Updating default QualityProfile: {0}", sd.Name)); + sd.QualityProfileId = sdDb.QualityProfileId; + repository.Update(sd); } - //Add or Update DVD - Logger.Debug(String.Format("Checking for default QualityProfile: {0}", dvd.Name)); - var dvdDb = repository.Single(i => i.Name == dvd.Name); - if (dvdDb == null) + //Add or Update HD + Logger.Debug(String.Format("Checking for default QualityProfile: {0}", hd.Name)); + var hdDb = repository.Single(i => i.Name == hd.Name); + if (hdDb == null) { - Logger.Debug(String.Format("Adding new default QualityProfile: {0}", dvd.Name)); - repository.Add(dvd); + Logger.Debug(String.Format("Adding new default QualityProfile: {0}", hd.Name)); + repository.Add(hd); } else { - Logger.Debug(String.Format("Updating default QualityProfile: {0}", dvd.Name)); - dvd.QualityProfileId = dvdDb.QualityProfileId; - repository.Update(dvd); - } - - //Add or Update BDRip - Logger.Debug(String.Format("Checking for default QualityProfile: {0}", bdrip.Name)); - var bdripDb = repository.Single(i => i.Name == bdrip.Name); - if (bdripDb == null) - { - Logger.Debug(String.Format("Adding new default QualityProfile: {0}", bdrip.Name)); - repository.Add(bdrip); - } - - else - { - Logger.Debug(String.Format("Updating default QualityProfile: {0}", bdrip.Name)); - bdrip.QualityProfileId = bdripDb.QualityProfileId; - repository.Update(bdrip); - } - - //Add or Update HDTV - Logger.Debug(String.Format("Checking for default QualityProfile: {0}", hdtv.Name)); - var hdtvDb = repository.Single(i => i.Name == hdtv.Name); - if (hdtvDb == null) - { - Logger.Debug(String.Format("Adding new default QualityProfile: {0}", hdtv.Name)); - repository.Add(hdtv); - } - - else - { - Logger.Debug(String.Format("Updating default QualityProfile: {0}", hdtv.Name)); - hdtv.QualityProfileId = hdtvDb.QualityProfileId; - repository.Update(hdtv); - } - - //Add or Update WEBDL - Logger.Debug(String.Format("Checking for default QualityProfile: {0}", webdl.Name)); - var webdlDb = repository.Single(i => i.Name == webdl.Name); - if (webdlDb == null) - { - Logger.Debug(String.Format("Adding new default QualityProfile: {0}", webdl.Name)); - repository.Add(webdl); - } - - else - { - Logger.Debug(String.Format("Updating default QualityProfile: {0}", webdl.Name)); - webdl.QualityProfileId = webdlDb.QualityProfileId; - repository.Update(webdl); - } - - //Add or Update Bluray - Logger.Debug(String.Format("Checking for default QualityProfile: {0}", bluray.Name)); - var blurayDb = repository.Single(i => i.Name == bluray.Name); - if (blurayDb == null) - { - Logger.Debug(String.Format("Adding new default QualityProfile: {0}", bluray.Name)); - repository.Add(bluray); - } - - else - { - Logger.Debug(String.Format("Updating default QualityProfile: {0}", bluray.Name)); - bluray.QualityProfileId = blurayDb.QualityProfileId; - repository.Update(bluray); + Logger.Debug(String.Format("Updating default QualityProfile: {0}", hd.Name)); + hd.QualityProfileId = hdDb.QualityProfileId; + repository.Update(hd); } } } diff --git a/NzbDrone.Core/Parser.cs b/NzbDrone.Core/Parser.cs index c88550ab4..8e1af4c82 100644 --- a/NzbDrone.Core/Parser.cs +++ b/NzbDrone.Core/Parser.cs @@ -190,7 +190,13 @@ namespace NzbDrone.Core if (name.Contains("bluray")) { - return QualityTypes.Bluray; + if (name.Contains("720p")) + return QualityTypes.Bluray720; + + if (name.Contains("1080p")) + return QualityTypes.Bluray1080; + + return QualityTypes.Bluray720; } if (name.Contains("web-dl")) return QualityTypes.WEBDL; diff --git a/NzbDrone.Core/Providers/RssItemProcessingProvider.cs b/NzbDrone.Core/Providers/RssItemProcessingProvider.cs index 0de0edd56..1e91915cb 100644 --- a/NzbDrone.Core/Providers/RssItemProcessingProvider.cs +++ b/NzbDrone.Core/Providers/RssItemProcessingProvider.cs @@ -359,8 +359,8 @@ namespace NzbDrone.Core.Providers if (String.IsNullOrEmpty(path)) { //Use the NZBDrone root Directory + /NZBs - //path = CentralDispatch.StartupPath + "NZBs"; - path = @"C:\Test\NZBs"; + path = CentralDispatch.StartupPath + "NZBs"; + //path = @"C:\Test\NZBs"; } if (_diskProvider.FolderExists(path)) diff --git a/NzbDrone.Core/Repository/Quality/QualityTypes.cs b/NzbDrone.Core/Repository/Quality/QualityTypes.cs index d18f211d4..39c4db84d 100644 --- a/NzbDrone.Core/Repository/Quality/QualityTypes.cs +++ b/NzbDrone.Core/Repository/Quality/QualityTypes.cs @@ -31,9 +31,12 @@ namespace NzbDrone.Core.Repository.Quality /// WEBDL = 5, /// - /// HD File (Blu-ray Source could be 1080p or 720p) + /// HD File (720p Blu-ray Source) /// - Bluray = 6, - + Bluray720 = 6, + /// + /// HD File (1080p Blu-ray Source) + /// + Bluray1080 = 7, } } \ No newline at end of file diff --git a/NzbDrone.Web/NzbDrone.Web.Publish.xml b/NzbDrone.Web/NzbDrone.Web.Publish.xml index 8e47c9855..58860a7c2 100644 --- a/NzbDrone.Web/NzbDrone.Web.Publish.xml +++ b/NzbDrone.Web/NzbDrone.Web.Publish.xml @@ -1,6 +1,6 @@  - + @@ -16,11 +16,12 @@ + + - @@ -32,7 +33,6 @@ - @@ -42,10 +42,9 @@ - + - @@ -63,8 +62,9 @@ + - + @@ -77,14 +77,14 @@ - + - + @@ -92,6 +92,7 @@ + @@ -104,25 +105,24 @@ - - + - + - + - + + - @@ -136,8 +136,8 @@ - - + + @@ -162,4 +162,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file