diff options
| author | JPVenson <github@jpb.email> | 2025-06-04 01:49:41 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-03 16:49:41 -0600 |
| commit | d5672ce407dda5e6e2422a7ce7ea6ad561759001 (patch) | |
| tree | 18de4f39ae533012f36f42a569a392221097f7c1 /Jellyfin.Server/Migrations/JellyfinMigrationBackupAttribute.cs | |
| parent | 0c46431cbb48850fae0e425e95692a1a9bbce427 (diff) | |
Add declarative backups for migrations (#14135)
Diffstat (limited to 'Jellyfin.Server/Migrations/JellyfinMigrationBackupAttribute.cs')
| -rw-r--r-- | Jellyfin.Server/Migrations/JellyfinMigrationBackupAttribute.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Jellyfin.Server/Migrations/JellyfinMigrationBackupAttribute.cs b/Jellyfin.Server/Migrations/JellyfinMigrationBackupAttribute.cs new file mode 100644 index 000000000..6c8da7e82 --- /dev/null +++ b/Jellyfin.Server/Migrations/JellyfinMigrationBackupAttribute.cs @@ -0,0 +1,35 @@ +using System; + +namespace Jellyfin.Server.Migrations; + +/// <summary> +/// Marks an <see cref="JellyfinMigrationAttribute"/> migration and instructs the <see cref="JellyfinMigrationService"/> to perform a backup. +/// </summary> +[AttributeUsage(System.AttributeTargets.Class, Inherited = true, AllowMultiple = true)] +public sealed class JellyfinMigrationBackupAttribute : System.Attribute +{ + /// <summary> + /// Gets or Sets a value indicating whether a backup of the old library.db should be performed. + /// </summary> + public bool LegacyLibraryDb { get; set; } + + /// <summary> + /// Gets or Sets a value indicating whether a backup of the Database should be performed. + /// </summary> + public bool JellyfinDb { get; set; } + + /// <summary> + /// Gets or Sets a value indicating whether a backup of the metadata folder should be performed. + /// </summary> + public bool Metadata { get; set; } + + /// <summary> + /// Gets or Sets a value indicating whether a backup of the Trickplay folder should be performed. + /// </summary> + public bool Trickplay { get; set; } + + /// <summary> + /// Gets or Sets a value indicating whether a backup of the Subtitles folder should be performed. + /// </summary> + public bool Subtitles { get; set; } +} |
