mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #13839] [MERGED] Recognize file changes and remove data on change #13734
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/13839
Author: @Shadowghost
Created: 4/4/2025
Status: ✅ Merged
Merged: 5/5/2025
Merged by: @crobibero
Base:
master← Head:recognize-file-changes📝 Commits (5)
78a98a7Recognize file changes and remove data on change60d063aAdd migration for internal item pathsa18263dFix check calculations in migrationsd565b16Cleanup MediaSegments, fix packages and add documentation to MetadataServiceseca4534Fix tests📊 Changes
57 files changed (+1914 additions, -1124 deletions)
View changed files
📝
Emby.Server.Implementations/ApplicationHost.cs(+2 -2)📝
Emby.Server.Implementations/Collections/CollectionManager.cs(+4 -4)➕
Emby.Server.Implementations/Library/KeyframeManager.cs(+44 -0)📝
Emby.Server.Implementations/Library/LibraryManager.cs(+77 -45)📝
Emby.Server.Implementations/Library/PathManager.cs(+14 -0)📝
Emby.Server.Implementations/Library/ResolverHelper.cs(+15 -5)📝
Emby.Server.Implementations/Playlists/PlaylistManager.cs(+4 -2)📝
Emby.Server.Implementations/ScheduledTasks/Tasks/MediaSegmentExtractionTask.cs(+1 -1)📝
Jellyfin.Api/Controllers/MediaSegmentsController.cs(+1 -1)📝
Jellyfin.Server.Implementations/Item/KeyframeRepository.cs(+8 -0)📝
Jellyfin.Server.Implementations/MediaSegments/MediaSegmentManager.cs(+8 -1)📝
Jellyfin.Server/Migrations/Routines/MigrateKeyframeData.cs(+5 -0)📝
Jellyfin.Server/Migrations/Routines/MoveExtractedFiles.cs(+5 -0)➕
Jellyfin.Server/Migrations/Routines/RefreshInternalDateModified.cs(+131 -0)📝
MediaBrowser.Controller/Entities/BaseItem.cs(+36 -4)📝
MediaBrowser.Controller/IO/IPathManager.cs(+9 -1)➕
MediaBrowser.Controller/Library/IKeyframeManager.cs(+37 -0)📝
MediaBrowser.Controller/Library/ILibraryManager.cs(+4 -4)📝
MediaBrowser.Controller/MediaSegments/IMediaSegmentManager.cs(+8 -1)📝
MediaBrowser.Controller/MediaSegments/IMediaSegmentProvider.cs(+2 -4)...and 37 more files
📄 Description
Up until now you could replace a file with a file named the same and Jellyfin would only refresh it under certain circumstances without pruning already extracted data. But this file could (and likey does) have different subtitles and attachments and potentially even has a different resolution or runtime, so trickplay files might be off too.
Changes
DateModifiedBaseItem.DateModifiedand checkBaseItem.Sizeand fix them if necessaryMetadataManager.BeforeSaveto check for filesystem differences:DateModified,Sizeand potentiallyDateCreated(depending on server setting) on scanRemarks
We use the
LastWriteTimewhich corresponds withmtimeon Linux and is reliable on Windows. Contrary to that creation time is not reliable on Windows due to filesystem tunneling ,🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.