mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-27 22:56:45 -04:00
Cleaned up 2160p changes and added migration and tests.
Also reserved the quality ids for WEBRip etc.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using FluentMigrator;
|
||||
using NzbDrone.Common.Serializer;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(101)]
|
||||
public class add_ultrahd_quality_in_profiles : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Execute.WithConnection(ConvertProfile);
|
||||
}
|
||||
|
||||
private void ConvertProfile(IDbConnection conn, IDbTransaction tran)
|
||||
{
|
||||
var updater = new ProfileUpdater70(conn, tran);
|
||||
updater.AppendQuality(16); // HDTV2160p
|
||||
updater.AppendQuality(18); // WEBDL2160p
|
||||
updater.AppendQuality(19); // Bluray2160p
|
||||
updater.Commit();
|
||||
|
||||
// WEBRip migrations.
|
||||
//updater.SplitQualityAppend(1, 11); // HDTV480p after SDTV
|
||||
//updater.SplitQualityPrepend(8, 12); // WEBRip480p before WEBDL480p
|
||||
//updater.SplitQualityAppend(2, 13); // Bluray480p after DVD
|
||||
//updater.SplitQualityPrepend(5, 14); // WEBRip720p before WEBDL720p
|
||||
//updater.SplitQualityPrepend(3, 15); // WEBRip1080p before WEBDL1080p
|
||||
//updater.SplitQualityPrepend(18, 17); // WEBRip2160p before WEBDL2160p
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user