diff options
| author | JPVenson <github@jpb.email> | 2025-07-30 20:14:24 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.email> | 2025-07-30 20:14:24 +0000 |
| commit | c8d2f436608c631e94461e70c3a7511031d32f58 (patch) | |
| tree | 36ea71961cab4afa467602bbdcc2490f1a25050e | |
| parent | ef733c5acebcb2f14428e180f83ab24e5c9b3c45 (diff) | |
Add logging
| -rw-r--r-- | Jellyfin.Server/Migrations/Routines/ReseedFolderFlag.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/ReseedFolderFlag.cs b/Jellyfin.Server/Migrations/Routines/ReseedFolderFlag.cs index 371c2e8be..502763ac0 100644 --- a/Jellyfin.Server/Migrations/Routines/ReseedFolderFlag.cs +++ b/Jellyfin.Server/Migrations/Routines/ReseedFolderFlag.cs @@ -58,14 +58,15 @@ internal class ReseedFolderFlag : IAsyncMigrationRoutine { using var connection = new SqliteConnection($"Filename={libraryDbPath};Mode=ReadOnly"); var queryResult = connection.Query( -""" - SELECT guid FROM TypedBaseItems - - WHERE IsFolder = true -"""); - foreach (var entity in queryResult) + """ + SELECT guid FROM TypedBaseItems + WHERE IsFolder = true + """) + .Select(entity => entity.GetGuid(0)) + .ToList(); + _logger.LogInformation("Migrating the IsFolder flag for {Count} items.", queryResult.Count); + foreach (var id in queryResult) { - var id = entity.GetGuid(0); await dbContext.BaseItems.Where(e => e.Id == id).ExecuteUpdateAsync(e => e.SetProperty(f => f.IsFolder, true), cancellationToken).ConfigureAwait(false); } } |
