aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2024-11-10 20:40:24 +0000
committerJPVenson <github@jpb.email>2024-11-10 20:40:24 +0000
commitefc6611072cca6a417c09a1853ed20a88c377bb5 (patch)
treee6bcc0bd674167056118f74a253f6c4e2a3c71ef /Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
parentfb88d4837451fb1add09b015312f7967bbf2a273 (diff)
Refixed timing for migration
Diffstat (limited to 'Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs')
-rw-r--r--Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
index ba5d4a0e6..ec0fbddb6 100644
--- a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
+++ b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs
@@ -140,7 +140,7 @@ public class MigrateLibraryDb : IMigrationRoutine
migrationTotalTime += stopwatch.Elapsed;
_logger.LogInformation("Saving MediaStreamInfos entries took {0}.", stopwatch.Elapsed);
- stopwatch.Reset();
+ stopwatch.Restart();
_logger.LogInformation("Start moving People.");
var personsQuery = "select ItemId, Name, Role, PersonType, SortOrder from People p";
@@ -188,7 +188,7 @@ public class MigrateLibraryDb : IMigrationRoutine
dbContext.SaveChanges();
migrationTotalTime += stopwatch.Elapsed;
_logger.LogInformation("Saving People entries took {0}.", stopwatch.Elapsed);
- stopwatch.Reset();
+ stopwatch.Restart();
_logger.LogInformation("Start moving ItemValues.");
// do not migrate inherited types as they are now properly mapped in search and lookup.
@@ -222,7 +222,7 @@ public class MigrateLibraryDb : IMigrationRoutine
dbContext.SaveChanges();
migrationTotalTime += stopwatch.Elapsed;
_logger.LogInformation("Saving People ItemValues took {0}.", stopwatch.Elapsed);
- stopwatch.Reset();
+ stopwatch.Restart();
_logger.LogInformation("Start moving Chapters.");
var chapterQuery = "select ItemId,StartPositionTicks,Name,ImagePath,ImageDateModified,ChapterIndex from Chapters2";
@@ -238,7 +238,7 @@ public class MigrateLibraryDb : IMigrationRoutine
dbContext.SaveChanges();
migrationTotalTime += stopwatch.Elapsed;
_logger.LogInformation("Saving Chapters took {0}.", stopwatch.Elapsed);
- stopwatch.Reset();
+ stopwatch.Restart();
_logger.LogInformation("Start moving AncestorIds.");
var ancestorIdsQuery = "select ItemId, AncestorId, AncestorIdText from AncestorIds";
@@ -267,14 +267,14 @@ public class MigrateLibraryDb : IMigrationRoutine
dbContext.SaveChanges();
migrationTotalTime += stopwatch.Elapsed;
_logger.LogInformation("Saving AncestorIds took {0}.", stopwatch.Elapsed);
- stopwatch.Reset();
+ stopwatch.Restart();
connection.Close();
_logger.LogInformation("Migration of the Library.db done.");
_logger.LogInformation("Move {0} to {1}.", libraryDbPath, libraryDbPath + ".old");
File.Move(libraryDbPath, libraryDbPath + ".old");
- _logger.LogInformation("Migrating Library db took {0}.", stopwatch.Elapsed);
+ _logger.LogInformation("Migrating Library db took {0}.", migrationTotalTime);
if (dbContext.Database.IsSqlite())
{