Repository navigation
Update what's kept on the phone in the background - #82
Merged
Merged
Conversation
hatstand
force-pushed
the
claude/project-thread-wugi27-background-sync
branch
2 times, most recently
from
November 6, 2026 21:46
e2e7dee to
083041f
Compare
Base automatically changed from
claude/project-thread-wugi27-sync-updated
to
main
November 6, 2026 22:16
A background processing task syncs the rules for the last Clementine that synced, at its last address, no sooner than 6 hours after the app last went to the background or the last run. iOS starts it only while the phone is on power, and it runs only on a network Download over allows, never in Low Data Mode. It reconnects the app's own session without asking for every playlist's songs, checks that the Clementine answering is the one the rules are for, syncs through Syncer, and disconnects. When the app is already connected, its connection syncs instead. When iOS ends the task, Syncer.stop cancels the sync, which keeps what it has, so the next run carries on. A setting under Download over, on by default, turns it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2bAq6kZW6eyymkA3zsd4p
hatstand
force-pushed
the
claude/project-thread-wugi27-background-sync
branch
from
November 6, 2026 22:16
083041f to
7417a96
Compare
ScreenshotsFrom run 42303435999, against a real Clementine. Left: main. Right: this pull request, light and dark.
Screens at a failure |
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.





































The iOS side of clementine-player/Android-Remote#408, after #81.
Music kept on the phone with "Every time I connect" is now updated without opening the app. About every 6 hours, a background processing task syncs the rules for the last Clementine that synced, at its last address.
BGProcessingTaskRequest,requiresExternalPower) only while the phone is on power, usually overnight. It is scheduled when the app goes to the background and again after each run.BackgroundSync.runreconnects the app's ownRemoteSessionwithout asking for every playlist's songs. That connection doesn't offer the phone as a renderer either (resume(offeringRenderer: false)), so a Clementine can't start playing on the phone in the background. WithSyncer.onlyServerIDset, a different Clementine answering at that address is left alone, and doesn't become the one the rules shown are for. After the sync it disconnects, unless the app has been opened in the meantime. If the app is already connected, its connection syncs instead.Syncer.stop()cancels the sync. What's downloaded so far stays, and the next sync carries on.Behind testing features, so there's no release note.
Info.plistandproject.ymlgain theprocessingbackground mode and the task identifier. Neither change touches the project file.BackgroundSyncTestscovers:🤖 Generated with Claude Code
https://claude.ai/code/session_01R2bAq6kZW6eyymkA3zsd4p