Skip to content

Library toolbar rework + bulk local-file import into a "Local Files" playlist - #112

Merged
sanylax0 merged 1 commit into
mainfrom
claude/repo-review-improvements-yvk3t7-local-files
Jul 20, 2026
Merged

sanylax0 merged 1 commit into
mainfrom
claude/repo-review-improvements-yvk3t7-local-files

Conversation

@sanylax2

Copy link
Copy Markdown
Collaborator

Toolbar

  • Removed the dead "…" button: the manual sync-all lived in a secondaryAction placement, which iOS collapses into an ellipsis menu that appeared broken. (Per-playlist sync + auto-sync are untouched.)
  • Two add buttons, both composed plus-badge glyphs (SF Symbols has no plus-badged arrows, so the badge is drawn as an overlay):
    • +↓ download: import from other services — opens the existing link importer (YouTube / Spotify).
    • +↑ upload: import from your local files.

Local files import

The upload button opens a Files picker accepting audio files or entire folders. A picked folder is scanned recursively and filtered to things that are plausibly music (audio container extensions, not hidden, ≥250 KB so ringtones/UI sounds are skipped); everything found imports in bulk into a shared "Local Files" playlist.

iOS sandboxing note: apps cannot read the Files app's music folder unprompted. Granting the folder once through this picker is the sanctioned equivalent of "scan the system music folder" — and re-picking the same folder later re-scans it, with dedupe (title + artist + duration) so nothing double-imports.

Each import extracts embedded metadata (title/artist/duration) and cover art, creates a ready Track, and kicks off the normal post-ready analysis (BPM/key/loudness/silence) — so local songs participate fully in beatmatched, stem-separated transitions.

Foundation ported from appStoreReleaseCandidate

  • Track.stemKey (youtubeVideoID ?? id.uuidString) — local tracks get stem-cache identity; existing YouTube stems keep their keys.
  • Track.artworkPath + ArtworkStore (additive SwiftData property) for extracted art; artworkURL prefers it.
  • Stems pipeline + LibraryCleanup (and its three callers) rekeyed from youtubeVideoID to stemKey, so local tracks' cached audio/stems/artwork are cleaned up on delete like everything else.

Device checks

  • Library: "…" gone; magnifier + the two badge buttons render correctly.
  • +↑ → pick a folder of music → all songs appear in "Local Files" with correct titles/art; re-pick the same folder → no duplicates.
  • Play a local track: full playback, and stems separate for it (watch stems logs) enabling vocal-aware transitions.
  • Delete a local track/playlist → cached audio/stems/artwork removed.
  • Regression: YouTube/Spotify import via +↓ unchanged; deleting YouTube tracks still cleans shared caches correctly.
  • Run xcodegen generate after checkout (new source file).

🤖 Generated with Claude Code

https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP


Generated by Claude Code

…aylist

Removes the dead overflow ('...') toolbar item and replaces the plus button
with two composed add buttons: plus+download opens the services importer
(YouTube/Spotify links), plus+upload opens a Files picker that accepts audio
files or whole folders. Picked folders are scanned recursively, filtering to
audio types big enough to plausibly be songs, and everything imports into a
shared "Local Files" playlist (deduped by title/artist/duration) with
embedded metadata + artwork extraction and post-ready analysis.

Ports the App Store branch's local-import foundation to main: Track.stemKey
(video ID or UUID) so local tracks get stems/caches, Track.artworkPath +
ArtworkStore for embedded art, and stem/cleanup paths rekeyed from
youtubeVideoID to stemKey (existing YouTube stems keep their keys).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP

@sanylax0 sanylax0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hype

@sanylax0
sanylax0 merged commit 3769a6b into main Jul 20, 2026
1 check passed
sanylax0 added a commit that referenced this pull request Jul 20, 2026
…ments-yvk3t7-cloud-import

Materialize cloud-provider files (Google Drive) on local import [stacked on #112]
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.

3 participants