From c38ad65640d1846803bbf54dc4f920427d8420c1 Mon Sep 17 00:00:00 2001 From: Tyler Vigario Date: Sun, 14 Apr 2024 18:11:22 -0700 Subject: [PATCH 1/4] Update ReleaseStatus --- .../Migration/012_add_release_status.cs | 18 +++++++++++++++--- src/NzbDrone.Core/Music/Model/ReleaseStatus.cs | 6 +++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs b/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs index 4a3423e95..8511b8f4c 100644 --- a/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs +++ b/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs @@ -39,9 +39,11 @@ namespace NzbDrone.Core.Datastore.Migration public enum ReleaseStatus12 { Official = 0, - Promotional = 1, + Promotion = 1, Bootleg = 2, - Pseudo = 3 + Pseudo = 3, + Withdrawn = 4, + Cancelled = 5 } public class ProfileUpdater11 @@ -91,7 +93,7 @@ namespace NzbDrone.Core.Datastore.Migration }, new ProfileItem12 { - ReleaseStatus = (int)ReleaseStatus12.Promotional, + ReleaseStatus = (int)ReleaseStatus12.Promotion, Allowed = false }, new ProfileItem12 @@ -103,6 +105,16 @@ namespace NzbDrone.Core.Datastore.Migration { ReleaseStatus = (int)ReleaseStatus12.Pseudo, Allowed = false + }, + new ProfileItem12 + { + ReleaseStatus = (int)ReleaseStatus12.Withdrawn, + Allowed = false + }, + new ProfileItem12 + { + ReleaseStatus = (int)ReleaseStatus12.Cancelled, + Allowed = false } }; } diff --git a/src/NzbDrone.Core/Music/Model/ReleaseStatus.cs b/src/NzbDrone.Core/Music/Model/ReleaseStatus.cs index f9352fcdf..f48018627 100644 --- a/src/NzbDrone.Core/Music/Model/ReleaseStatus.cs +++ b/src/NzbDrone.Core/Music/Model/ReleaseStatus.cs @@ -69,13 +69,17 @@ namespace NzbDrone.Core.Music public static ReleaseStatus Promotion => new ReleaseStatus(1, "Promotion"); public static ReleaseStatus Bootleg => new ReleaseStatus(2, "Bootleg"); public static ReleaseStatus Pseudo => new ReleaseStatus(3, "Pseudo-Release"); + public static ReleaseStatus Withdrawn => new ReleaseStatus(4, "Withdrawn"); + public static ReleaseStatus Cancelled => new ReleaseStatus(5, "Cancelled"); public static readonly List All = new List { Official, Promotion, Bootleg, - Pseudo + Pseudo, + Withdrawn, + Cancelled }; public static ReleaseStatus FindById(int id) From 7deff408774967c7df6fc5affed54916ad6dce11 Mon Sep 17 00:00:00 2001 From: Tyler Vigario Date: Sun, 14 Apr 2024 18:52:01 -0700 Subject: [PATCH 2/4] Revert migration changes --- .../Datastore/Migration/012_add_release_status.cs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs b/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs index 8511b8f4c..0fa57a705 100644 --- a/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs +++ b/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs @@ -41,9 +41,7 @@ namespace NzbDrone.Core.Datastore.Migration Official = 0, Promotion = 1, Bootleg = 2, - Pseudo = 3, - Withdrawn = 4, - Cancelled = 5 + Pseudo = 3 } public class ProfileUpdater11 @@ -105,16 +103,6 @@ namespace NzbDrone.Core.Datastore.Migration { ReleaseStatus = (int)ReleaseStatus12.Pseudo, Allowed = false - }, - new ProfileItem12 - { - ReleaseStatus = (int)ReleaseStatus12.Withdrawn, - Allowed = false - }, - new ProfileItem12 - { - ReleaseStatus = (int)ReleaseStatus12.Cancelled, - Allowed = false } }; } From b15ac075f9e178330ac8e3405ebab0701e4c0cdc Mon Sep 17 00:00:00 2001 From: Tyler Vigario Date: Sun, 14 Apr 2024 18:55:31 -0700 Subject: [PATCH 3/4] Missed one revert --- src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs b/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs index 0fa57a705..464399195 100644 --- a/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs +++ b/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs @@ -91,7 +91,7 @@ namespace NzbDrone.Core.Datastore.Migration }, new ProfileItem12 { - ReleaseStatus = (int)ReleaseStatus12.Promotion, + ReleaseStatus = (int)ReleaseStatus12.Promotional, Allowed = false }, new ProfileItem12 From 42c2c530216b9e8df20931755c14a99335b1615b Mon Sep 17 00:00:00 2001 From: Tyler Vigario Date: Sun, 14 Apr 2024 19:00:20 -0700 Subject: [PATCH 4/4] One more --- src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs b/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs index 464399195..4a3423e95 100644 --- a/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs +++ b/src/NzbDrone.Core/Datastore/Migration/012_add_release_status.cs @@ -39,7 +39,7 @@ namespace NzbDrone.Core.Datastore.Migration public enum ReleaseStatus12 { Official = 0, - Promotion = 1, + Promotional = 1, Bootleg = 2, Pseudo = 3 }