Skip to content

Materialize cloud-provider files (Google Drive) on local import [stacked on #112] - #113

Merged
sanylax0 merged 1 commit into
claude/repo-review-improvements-yvk3t7-local-filesfrom
claude/repo-review-improvements-yvk3t7-cloud-import
Jul 20, 2026
Merged

sanylax0 merged 1 commit into
claude/repo-review-improvements-yvk3t7-local-filesfrom
claude/repo-review-improvements-yvk3t7-cloud-import

Conversation

@sanylax2

Copy link
Copy Markdown
Collaborator

Stacked on #112 (base = its branch; merge #112 first, then retarget/merge this).

What

The upload (+↑) button's Files picker already lists Google Drive as a source once the Drive app is installed and enabled in the Files app — iOS document pickers surface every file provider, no Google SDK/OAuth needed.

What didn't work reliably: cloud picks often arrive as unmaterialized placeholders (the bytes are still in the cloud), and the direct copyItem into the audio cache fails on those. This PR retries the copy through NSFileCoordinator — a coordinated read instructs the provider to download the real file (blocking off-main while it fetches), then the normal import path (metadata, artwork, "Local Files" playlist, analysis) proceeds unchanged.

Covers Google Drive, iCloud Drive, Dropbox, and any other Files-app provider.

Known limitation

Whole-folder scanning works best for on-device/iCloud folders. Some providers (Drive included) don't expose folder enumeration to the picker or return placeholder sizes; picking individual songs (multi-select works) is the dependable path for Drive.

Device checks

🤖 Generated with Claude Code

https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP


Generated by Claude Code

…ocal import

Files picked from cloud file providers often arrive as unmaterialized
placeholders, so the direct copyItem into the audio cache fails. Retry the
copy through NSFileCoordinator: the coordinated read tells the provider to
download the real bytes (blocking off-main while it fetches), after which
the normal import path proceeds. Makes the upload button work with Google
Drive and other Files-app providers, not just on-device storage.

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.

goated

@sanylax0
sanylax0 merged commit d4763f6 into claude/repo-review-improvements-yvk3t7-local-files Jul 20, 2026
1 check passed
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