Stash v0.5.2
feat: 0.5.2 — SAF-aware delete + live player eviction + Last.fm in release
Three bug fixes, one architectural cleanup, one release-pipeline fix.
SAF storage file-leak fixed. Every delete path in MusicRepositoryImpl
used java.io.File(path).delete(), which silently returns false for
content:// URIs. Users who moved their library to an SD card or USB-OTG
folder (via the Settings > Move library action) were leaking a ghost
file on every delete. A new SAF-aware helper branches on "content://"
and routes those paths through DocumentFile.fromSingleUri(...).delete.
Covers deleteTrack, the cascade delete path, blacklistTrack, and
the orphaned-mix cleanup sweep.
Playback now stops when you delete the current song. Previously,
ExoPlayer kept its open file handle after the DB row and file were
removed, so audio continued to play on a deleted track (reported on
Reddit by u/Superb_Agency_796). A new MusicRepository.trackDeletions
SharedFlow emits the deleted track id after every successful unlink;
PlayerRepositoryImpl subscribes once at construction and removes any
matching queue entries. Media3 auto-advances to the next song — or
stops cleanly when the queue empties.
Player eviction is automatic for future delete paths. The collector
lives in PlayerRepositoryImpl.init instead of in every ViewModel
delete action; any new repo-level delete entry-point just needs to
emit to _trackDeletions. No new delete path can silently forget to
tell the player.
Last.fm scrobbling works in release builds again. The 0.5.0 / 0.5.1
release APKs shipped with BuildConfig.LASTFM_API_KEY = "" because the
release.yml workflow referenced ${{ secrets.LASTFM_API_KEY }} and
${{ secrets.LASTFM_API_SECRET }} but the two secrets had never been
added to the repository. Those are now set; this release will carry
the key and the Settings UI will show the Connect button as intended.
No code change was needed for that part — only the repo's Actions
secrets.
Install
Download the .apk below and open it on your Android device. If you've got a previous Stash release installed, this upgrades in place — your library, sync history, and settings are preserved.
Requires: Android 8.0 (API 26) or newer.
See the README for first-time setup.
Full Changelog: v0.5.1...v0.5.2