Repository navigation
Conversation
The phone's record of what it keeps for offline listening: the sync rules, the songs and covers it has downloaded, which rules want which songs, and plays made on the phone, all kept per Clementine by its server id. A song is stored once however many rules want it, and goes once no rule wants it and it isn't pinned. It has the same tables as the Android client's, and nothing uses it yet. The database wrapper learns NULLs, blobs and typed rows for it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01R2bAq6kZW6eyymkA3zsd4p
…-wugi27-sync-engine
SyncEngine brings the phone's songs in line with the rules for one Clementine: it asks for each rule's manifest, downloads the songs that are new or changed into the synced songs' folder as Artist/Album/NN Title, and deletes the songs no rule or pin wants any more. A song in several rules is downloaded once, a rule that fails keeps its songs and lets the others carry on, and a sync cut short keeps what it downloaded. It talks to Clementine through SyncConnection, so the tests run it against a fake one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01R2bAq6kZW6eyymkA3zsd4p
ScreenshotsFrom run 40710246868, 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.





































Builds on #57 (the store for synced songs). Until that merges, review only e3a629f.
It's part of media sync, which keeps music from Clementine on the phone to play offline. The design doc describes the whole of it.
SyncEnginebrings the phone's songs in line with the sync rules for one Clementine, as the Android client's engine does:Artist/Album/NN Title.ext, through a hidden partial file so a download cut short leaves nothing half-written. Songs with the same name get " (2)" and so on.It talks to Clementine through
SyncConnection, so the tests run it against a fake Clementine. Wiring it to the real connection, covers and conversions come in later pull requests. It's behind the testing features flag like the rest of media sync, so nothing changes for users yet.Generated by Claude Code