Skip to content

fix: APK update variant selection & Dolby Atmos stereo lossless fallback - #339

Merged
ajisth69 merged 2 commits into
mainfrom
fix/update-apk-variant-selection
Oct 17, 2026
Merged

ajisth69 merged 2 commits into
mainfrom
fix/update-apk-variant-selection

Conversation

@ajisth69

@ajisth69 ajisth69 commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  1. Fix update APK selection: Dynamically downloads matching APK variant (universal.apk, universal-uncompressed.apk, or android7.apk) instead of always pulling the legacy Android 7 APK.
  2. Fix Dolby Atmos fallback: When Dolby Atmos is selected but unavailable for a track, gracefully falls back to Stereo Lossless (Hi-Res / CD FLAC) instead of skipping to YouTube Music Opus.

Root Cause & Changes

1. APK Variant Selection

  • In AppUpdateManager.kt, the release asset loop naively grabbed the first asset ending in .apk. Because GitHub releases list assets alphabetically, LastWave-v*-android7.apk was at index 0, so all users on Android 10+ standard and uncompressed releases were erroneously downloading the legacy Android 7.0 build.
  • Added classifyAsset and selectBestAsset to properly match rawRelease (uncompressed), Android 7-9 (legacy), and Android 10+ (universal).

2. Dolby Atmos -> Stereo Lossless Fallback

  • When Dolby Atmos (QUALITY_DOLBY_ATMOS = 28) was selected, if the track did not have a spatial audio mix on the addon, LosslessMusicApi.resolveStream returned null and triggered noteBackendFailure().
  • After 2 misses, the backend cooldown (isCoolingDown) turned on, forcing the current track and all subsequent tracks directly to YouTube Music Opus.
  • Fix: In LosslessMusicApi.kt and MusicPlayer.kt, when Dolby Atmos is not found, it seamlessly falls back to QUALITY_MAX_HI_RES (Stereo Hi-Res / CD FLAC) without triggering backend failure cooldown.

@ajisth69 ajisth69 changed the title fix(update): dynamically select matching APK variant (universal, uncompressed, or android7) fix: APK update variant selection & Dolby Atmos stereo lossless fallback Oct 17, 2026
@ajisth69
ajisth69 merged commit 31eda2d into main Oct 17, 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.

1 participant