diff options
| author | Shadowghost <Shadowghost@users.noreply.github.com> | 2026-09-27 16:30:59 -0400 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2026-09-27 16:30:59 -0400 |
| commit | c5f5377e00b64058b5c04ca82cefd6cb646a3638 (patch) | |
| tree | cf1b202ba189b62ed52d46d35a00f9687f5c02f9 /src/Jellyfin.Database/Jellyfin.Database.Implementations | |
| parent | 3142fcd12fc063ea4b4a181c2af7384e6f2c1683 (diff) | |
Backport pull request #18196 from jellyfin/release-12.z
Skip statistics on an empty library and refresh them after every scan
Original-merge: 83b89218e54754b22831399d592cd0f4b6185812
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'src/Jellyfin.Database/Jellyfin.Database.Implementations')
| -rw-r--r-- | src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs index 0a72287ba9..6efced6556 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/IJellyfinDatabaseProvider.cs @@ -45,6 +45,15 @@ public interface IJellyfinDatabaseProvider Task RunScheduledOptimisation(CancellationToken cancellationToken); /// <summary> + /// If supported this should refresh the query planner statistics, e.g. after a library scan changed the data. + /// Unlike <see cref="RunScheduledOptimisation(CancellationToken)"/> it should not reclaim space, so that it stays + /// cheap enough to run after every scan. + /// </summary> + /// <param name="cancellationToken">The token to abort the operation.</param> + /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns> + Task RefreshStatistics(CancellationToken cancellationToken) => Task.CompletedTask; + + /// <summary> /// If supported this should perform any actions that are required on stopping the jellyfin server. This runs /// against a deadline imposed by the service manager, so unlike /// <see cref="RunScheduledOptimisation(CancellationToken)"/> it should only do work whose cost does not grow with |
