Skip to content

Fix/release r8 build fix#1053

Merged
theovilardo merged 2 commits intomasterfrom
fix/release-r8-build-fix
Feb 14, 2026
Merged

Fix/release r8 build fix#1053
theovilardo merged 2 commits intomasterfrom
fix/release-r8-build-fix

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

No description provided.

- **HTTP Server**:
    - Switch Ktor engine from Netty to CIO and add a health check endpoint.
    - Implement smarter IP selection with subnet matching to ensure the server is reachable by the Cast device.
    - Add automatic port fallback if 8080 is occupied.
    - Improve foreground service management and start/stop state handling.

- **Cast Integration**:
    - Add a "priming" mechanism to start the HTTP server while the app is in the foreground, avoiding background service restrictions.
    - Implement a preflight "wait for endpoint" check to ensure media is ready before sending the load command to the Cast device.
    - Enhance error reporting with specific toast messages for connection failures and session issues.
    - Add detailed error callback to `CastTransferStateHolder` to surface playback errors to the UI.

- **Data & Backup**:
    - Migrate `TypeToken` usage to `TypeToken.getParameterized` across all backup modules to fix potential generic type erasure issues in release builds.
    - Add ProGuard rules for Gson, Netty, Ktor, and Cast framework to prevent R8 from stripping reflective entry points or service-loaded classes.
- **PlayerViewModel**:
    - Update `playSong` to use a derived `playbackContext`, ensuring consistency between local and remote playback queues.
    - Switch from object equality to ID-based matching (`indexOfFirst { it.id == ... }`) when locating songs in lists and queues to prevent failures due to stale object references.
    - Implement `effectiveStartSong` logic in `internalPlaySongs` to safely fallback to the first available song if the requested song is missing.
    - Add safety check to `internalPlaySongs` to handle empty song lists.

- **Queue & Cast Management**:
    - Update `QueueStateHolder` and `CastTransferStateHolder` to use ID-based index lookups when building shuffled queues or transferring playback to Cast devices.
    - Ensure `validStartSong` selection in `playSongs` remains robust by validating against song IDs after filtering.
@theovilardo theovilardo merged commit 73400e6 into master Feb 14, 2026
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