feat: Copy downloaded music to public Music folder#2878
Open
vampirepapi wants to merge 9 commits intoMetrolistGroup:mainfrom
Open
feat: Copy downloaded music to public Music folder#2878vampirepapi wants to merge 9 commits intoMetrolistGroup:mainfrom
vampirepapi wants to merge 9 commits intoMetrolistGroup:mainfrom
Conversation
When a download completes, the cached audio is now exported to the public Music/Metrolist/ directory so users can access files via file managers and other music apps. Uses MediaStore API on Android 10+ and direct file I/O on Android 8-9. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upload unsigned APK directly instead of requiring signing secrets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Unsigned release APKs cannot be installed. Switch to debug build which is auto-signed with the debug keystore. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The debug build requires a persistent-debug.keystore file. Generate one on the fly using keytool. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reading span files directly may not work reliably. Switch to CacheDataSource which properly reads cached data through the ExoPlayer cache API. Added logging for debugging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show a toast on success (with file path) or failure (with error message) so the user can see what's happening without logcat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MediaStore rejects audio/webm as unsupported. Map it to audio/ogg which is accepted and compatible (WebM audio uses Opus/Vorbis codecs). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e extensions When audio/webm was converted to audio/ogg for MediaStore, the filename still used .webm extension, causing MediaStore to append .oga resulting in .webm.oga files. Now the extension is derived after MIME type conversion so the filename matches what MediaStore expects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Always use audio/mp4 MIME type and .m4a extension for exported files, ensuring compatibility with Samsung smartwatches and other devices that don't support .ogg/.webm formats. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Duplicate of #119? |
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.
Summary
Music/Metrolist/in public storage so users can access downloaded songs fromany file manager or music player
WRITE_EXTERNAL_STORAGEon Android 8-9.m4aformat for maximum device compatibility (including smartwatches)Changes
AndroidManifest.xml— AddedWRITE_EXTERNAL_STORAGEpermission (maxSdkVersion=28)DownloadUtil.kt— OnSTATE_COMPLETED, fetches song metadata and triggers exportMusicFileExporter.kt(new) — Utility that reads cached audio viaCacheDataSourceand writes to public Music folder. Handles filenamesanitization, duplicate overwrite, and toast notifications
build_quick.yml— Build workflow improvements for debug APK generationTest plan
Internal Storage > Music > Metrolist.m4afile exists with correctArtist - Title.m4anaming