Repository navigation
feat(locallibrary): exportExt.pdb and intelligent playlists in collection export, parallel prep sync - #319
Merged
Conversation
…tion export, parallel prep Planned as these commits, folded into one because they share files: - feat(locallibrary): write exportExt.pdb on collection export - feat(locallibrary): export rekordbox intelligent playlists with smart rules - feat(locallibrary): copy onto prep's drives at once, bounded by core count - feat(locallibrary-cli): warn before changing a store copy
bnb
previously approved these changes
Oct 30, 2026
botandbang
enabled auto-merge
October 30, 2026 16:35
SizeCompared with main. KiB are 1,024 bytes.
|
Rust coverageFrom run 650. Both are held to the thresholds in .cargo/config.toml.
|
bnb
approved these changes
Oct 30, 2026
Contributor
Author
|
Closing and reopening so CI reruns on a merge ref that includes #344's destinations test fix. Branch unchanged. |
auto-merge was automatically disabled
October 31, 2026 03:26
Pull request was closed
botandbang
enabled auto-merge
October 31, 2026 03:26
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.
What and why
collection export now writes exportExt.pdb next to export.pdb, so players that read export.pdb (CDJ-3000 and older) get the collection's My Tags. A new exportExt.pdb is made from an emptied rekordbox template kept in the package (the vendored crate's MIT test file), filled with the collection's categories and tags under the ids OneLibrary gets, and its track links go through the same
carry_into_extwriter convert and merge use, verification included.Intelligent playlists are no longer left out. masterdb reads the SmartList rules (format as pyrekordbox documents it) and resolves My Tag ids. The export fills each intelligent playlist with the tracks its rules match. When a locallibrary filter can say the rules, the plan carries a smart rule for the drive, and applying the export with a store saves it limited to that drive, so
smart applykeeps the playlist current. A later export takes away the rules of intelligent playlists that are gone, and never replaces a rule someone else made at the same path. Rules a filter can't say (artist, starts with, in the last N days, and a few fields filters lack) go out as the tracks they hold now, and the plan names them. Rules that can't be read stay behind, also named. A property test checks that every filter produced matches exactly what the rules match.prep now copies the newest drive onto the others at once through the multi-drive sync when two or more need a copy and none came back from a set. A drive back from a set keeps its own pair sync, which saves the players' changes first. The multi-drive sync runs at most one target per core, through a new bounded worker helper that
probe::paralleluses too.A change planned against a store that
store copymade (opened with--store) now warns first that the nextstore copythere will refuse it unless forced.Changed:
masterdb::tags_by_fileis a free function,query::date_valueis crate-visible,CollectionExportPlanhas asmartfield (RPC contract regenerated), andCollectionExportRecordhas asmartfield.Removed:
probe::parallel's own thread queue, and the TODO lines for these four items.Fixes LOC-41
Fixes #141
Fixes LOC-63
Fixes #164
Refs LOC-40 (confirming My Tags in Track Filter on a CDJ-3000 is still to do)
Refs #140
How it was tested
cargo fmt --check, andcargo clippy -p locallibrary -p locallibrary-cli --all-targets -- -D warnings.cargo nextest run -p locallibraryon the masterdb, smartlist, collection, tags, smart, probe, workers, sync, offsite, query, jobs, prep and copy tests: 381 pass.cargo nextest run -p locallibrary-clion the store, collection, exports, rpc, command line, prep, players and output tests: 227 pass.ext: None, the SmartList filter property withCompare::Isas>=, the prep test with pairwise work ("one sync onto both, left: 2 right: 1"), and the store test without the warning.docs/rpcregenerated withcargo run -p locallibrary-cli -- rpc --emit-schema apps/locallibrary/docs/rpc.Checklist
apps/locallibrary/CHANGELOG.mdhas a line under Unreleased, if people using it will noticedocs/and--helpstill say what the code does (apps/locallibrary/docs/rpc/too, for a sidecar change)