Skip to content

FileWatcher UPDATE event / invalidate cache - #5777

Merged
SubJunk merged 4 commits into
UniversalMediaServer:mainfrom
ik666:check/filescan_update
Oct 3, 2025
Merged

SubJunk merged 4 commits into
UniversalMediaServer:mainfrom
ik666:check/filescan_update

Conversation

@ik666

@ik666 ik666 commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

This PR fixes an issue where file updates (e.g. metadata changes) weren’t reflected at the control point.

Previously, the database was updated correctly, but because MediaInfo was cached, the control point was still receiving a stale object.

The changes address this by refreshing the cached MediaInfo when a file is rescanned, so both control points and the UMS UI always see the latest metadata.

@SubJunk

SubJunk commented Sep 30, 2025

Copy link
Copy Markdown
Member

Looks good, is it ready for review/merge?

} else if (ENTRY_DELETE.equals(event)) {
removeFileEntry(filename);
} else if (ENTRY_MODIFY.equals(event)) {
parseFileEntry(f, false, false);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SubJunk Is Line 541 still needed? Not sure, what's exactly suppose to do.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it re-parses a modified file, but I'm not sure if it works or just hits the cache

@ik666

ik666 commented Oct 2, 2025 •

Copy link
Copy Markdown
Contributor Author

@SubJunk I think it can be merged now.

@SubJunk
SubJunk merged commit ded3dd7 into UniversalMediaServer:main Oct 3, 2025
SubJunk added a commit that referenced this pull request Oct 5, 2025
SubJunk added a commit that referenced this pull request Oct 5, 2025
@ik666 ik666 mentioned this pull request Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants