fix(api): Dynamically reload apps.json for Moonlight API if modified on disk - #5506
Open
eduardomozart wants to merge 4 commits into
Open
fix(api): Dynamically reload apps.json for Moonlight API if modified on disk#5506eduardomozart wants to merge 4 commits into
eduardomozart wants to merge 4 commits into
Conversation
This adds a timestamp check in proc::refresh() and calls it from the /applist endpoint to ensure changes made to apps.json outside the Web UI are immediately reflected in Moonlight.
This adds a timestamp check in proc::refresh() and calls it from the /applist endpoint to ensure changes made to apps.json outside the Web UI are immediately reflected in Moonlight.
…/Sunshine into fix/applist-reload
eduardomozart
force-pushed
the
fix/applist-reload
branch
from
August 15, 2026 01:59
e11532b to
3e8b40d
Compare
eduardomozart
marked this pull request as ready for review
August 18, 2026 05:32
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
When
apps.jsonis modified directly on the filesystem (e.g. by external scripts or manually in a text editor), the Moonlight client still receives the old app list because the API relies on an in-memory cache ofproc::proc. This pull request fixes the issue by securely tracking the file'slast_write_timeinproc::refresh()and callingrefreshdynamically on the/applistAPI endpoint, seamlessly reloading the list only if modifications have occurred.Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage
See our AI usage policy.