diff options
| author | JPVenson <github@jpb.email> | 2024-11-10 20:40:24 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.email> | 2024-11-10 20:40:24 +0000 |
| commit | efc6611072cca6a417c09a1853ed20a88c377bb5 (patch) | |
| tree | e6bcc0bd674167056118f74a253f6c4e2a3c71ef /Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs | |
| parent | fb88d4837451fb1add09b015312f7967bbf2a273 (diff) | |
Refixed timing for migration
Diffstat (limited to 'Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs')
| -rw-r--r-- | Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs | 12 |
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()) { |
