Skip to content

Choose a format to convert to when syncing a USB - #18

Merged
claw1200 merged 3 commits into
mainfrom
usb-export-convert-ui
Oct 27, 2026
Merged

claw1200 merged 3 commits into
mainfrom
usb-export-convert-ui

Conversation

@claw1200

Copy link
Copy Markdown
Owner

Part 6 (last) of the "convert audio on USB export" series. Stacked on #17.

UI for converting on USB sync.

  • Sync dialog → "Convert audio": "Don't convert" (default, not remembered) or any of the user's conversion presets (same list as Convert file type in the track menu). A hint says tracks not already in that format are converted on the USB and the library isn't changed.
  • The chosen preset is part of the review (reviewKey), so changing it re-runs the review; review and sync are always given the same preset, so the review token matches.
  • Summary gains a second line from the new plan counts: Up to date · no changes, or e.g. 3 to convert · 1 to copy · 2 to remove, or No audio to copy or convert. Syncing again with the same format as last time shows no conversions or copies.
  • Progress: new convert phase → "Converting 4 of 20 · Title".
  • api.usbSyncReview / api.usbSync / library.syncTo take an optional preset.

Typecheck/svelte-check clean; no new lint errors (the file's existing prettier warnings are unchanged).

Manual check suggested: sync a playlist with a WAV and an MP3 using an MP3 preset → USB shows the WAV as .mp3, library still points at the WAV; reopen the dialog with the same preset → summary shows no conversions or copies; switch to "Don't convert" → summary shows 1 to copy.

The sync dialog offers the conversion presets, defaulting to no conversion.
The choice is part of the review, so changing it reviews again, and the
summary says how many tracks would be converted, copied or removed, or that
the USB is already up to date. Converting shows its own progress.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The preset is consistently passed through review and sync, and no unresolved issues were identified in the three changed files.

No open issues 🎉

What changed in this PR

Adds the USB-sync conversion UI on top of the existing backend, allowing users to choose an audio preset without changing library files.

Changes:

  • Adds a conversion preset picker and includes the selection in review refreshes.
  • Passes the optional preset through the API and library sync methods.
  • Displays planned copy, conversion, and removal counts, plus conversion progress.
File Description
app/​src/​renderer/​src/​lib/​library.svelte.ts Forwards the optional conversion preset to USB sync.
app/​src/​renderer/​src/​lib/​components/​SyncDialog.svelte Adds preset selection, review updates, plan summaries, and conversion progress.
app/​src/​renderer/​src/​lib/​api.ts Accepts conversion presets for USB review and sync requests.

Review effort: Balanced

@claw1200
claw1200 changed the base branch from usb-export-convert to main October 27, 2026 21:30
@claw1200
claw1200 merged commit d1eda4b into main Oct 27, 2026
3 checks passed
@claw1200
claw1200 deleted the usb-export-convert-ui branch October 27, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants