|
|
@ -58,21 +58,15 @@ namespace NzbDrone.Core.Providers
|
|
|
|
|
|
|
|
|
|
|
|
Logger.Debug("Setting up default quality types");
|
|
|
|
Logger.Debug("Setting up default quality types");
|
|
|
|
|
|
|
|
|
|
|
|
var qualityTypes = new List<QualityType>();
|
|
|
|
foreach(var qualityType in QualityTypes.All())
|
|
|
|
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 = "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 });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach(var qualityType in qualityTypes)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var db = inDb.SingleOrDefault(s => s.QualityTypeId == qualityType.QualityTypeId);
|
|
|
|
//Skip UNKNOWN
|
|
|
|
|
|
|
|
if (qualityType.Id == 0) continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var db = inDb.SingleOrDefault(s => s.QualityTypeId == qualityType.Id);
|
|
|
|
|
|
|
|
|
|
|
|
if (db == null)
|
|
|
|
if (db == null)
|
|
|
|
_database.Insert(qualityType);
|
|
|
|
_database.Insert(new QualityType { QualityTypeId = qualityType.Id, Name = qualityType.Name, MinSize = 0, MaxSize = 100 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|