Repository navigation
feat: optional music AI beta with unified DJ playback and native daily playlists - #49
Open
QuietForge7294 wants to merge 11 commits into
Open
QuietForge7294 wants to merge 11 commits into
QuietForge7294 wants to merge 11 commits into
Conversation
- PlayOrder.startShuffled: la file aléatoire démarre au premier élément de la permutation construite par Media3. L'index tiré au hasard perdait en moyenne 17,9 titres sur 40 (jusqu'à 38). - SessionCommand SHUFFLE_FROM_HEAD: la commande est traitée dans le service, seul endroit où la timeline est à jour de façon synchrone. - SessionArtworkTracker: la pochette DJ vient du titre audible (extras djTrackId) et non de l'identifiant du rendu; réévaluation sur changement de métadonnées. - LocalDjPlayer: Suivant/Précédent interceptés dans la façade qui porte la MediaSession (préparé: repère suivant; interactif: même chemin serveur que DJ_NEXT). - Tests: ShuffleStartTest, SessionArtworkCoverTest, DjNextControlTest.
… de répétition au lancement - Boutons aléatoire et répétition exposés via setMediaButtonPreferences, prioritaires sur le favori; leur état suit le lecteur (icônes et libellés mis à jour sur changement). - Commandes de session TOGGLE_SHUFFLE et CYCLE_REPEAT (hors -> tout -> un -> hors). - Un lancement explicite de l'aléatoire transforme « répéter un titre » en « répéter tout » et conserve « répéter tout ». - Tests d'échelle: 300 et 1 000 occurrences, doublons compris, sans perte; restauration de la permutation vérifiée.
QuietForge7294
marked this pull request as ready for review
November 8, 2026 20:26
- « Ajouter à la file » et le déplacement d'un titre ne convertissent plus le lecteur de session en ExoPlayer : la session porte LocalDjPlayer, donc le transtypage échouait avant de toucher la file. Les deux commandes passent par QueueEdit sur l'interface Player, qui met aussi l'ordre mélangé à jour sur le pont audio actif. - LocalDjPlayer.restoreShuffleOrder reconstruit son état : la façade gardait l'ancienne permutation, donc l'ordre restauré n'était pas celui qui jouait ni celui que Suivant suivait. - Tests QueueEditTest : ajout avec et sans aléatoire, file vide, déplacement en ordre direct et mélangé, refus du titre courant, opérations via la façade, permutation restaurée. - docs/android-auto.md : boutons Aléatoire/Répétition, règle « répéter un titre » au lancement de l'aléatoire, aléatoire complet, Suivant dans le mix. - Version 0.4.0-beta5, versionCode 14.
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.
Behavior
I keep classic playback, prepared/live server DJ and the device prototype behind the existing playback service and one MediaSession. Stale mode/account/selection work is fenced, pause is local, and renderer observations cannot restart playback. Joining a set now opens Now Playing; DJ-only media also appears in the mini player. An unjoined device offers Listen rather than a server-only resume.
Four colored daily mixes sit under favorite playlists. They open the native playlist screen and can be saved as a stable playlist with an editable name. The DJ studio, queue toggle and distinct seed actions use the same player.
The beta3 queue refreshes capabilities before deciding whether DJ can start. Unavailable controls can recheck and explain the actual gate, including an empty/short queue, disabled module, expired authentication or unavailable renderer. Preparation, a pending end-of-title relay and active playback have distinct labels and cancellation. A song-menu DJ request uses the selected engine and shows persistent progress, errors and an entry to the common player. Account changes retire the old UI and requests without stopping the new account.
Device beta and cache
Validation and limits
On the final beta3 source, 114 player-module tests and 216 app tests pass, with three app tests explicitly skipped. The full build, beta lint, Detekt and formatting pass. Coverage includes 14 coordinator regressions, 14 queue-control tests, 11 song-mix tests, four persistent-status dialog tests, queue UI controls, seven mini-player checks and the existing simulated Android Auto integration. Delayed responses, fresh trial gates, missing capabilities, cancellation, owner/device/selection changes and precise queue prerequisites are covered. Seven real SimpleBasePlayer decoder-stall regressions include four reproduced failures before the fade correction; recovery cannot undo a manual pause. Test fixture scopes are cleaned up before resetting the main dispatcher.
The optimized 0.4.0-beta3 / versionCode 12 artifact is non-debuggable and R8-shrunk, with the same signing certificate and permissions as beta2. Its SHA256 is
457a49d8b062b01ce3634d7bbade50634f6a71be732d7a04d187072c8e0c0607. README and behavior documentation describe the corrected controls and current limits.Previous physical Pixel 9 Pro / Android 17 and official Auto DHU checks apply to earlier betas only. The saved-playlist confirmation Robolectric test remains explicitly ignored after its reproducible idling failure; physical confirmation is still pending. No physical-device performance result or successful hour is claimed for this build.
I keep this PR in draft pending CI on this head, actual phone network/background/Bluetooth/audio checks, comparison of transitions, thermal/battery measurements and the server's uninterrupted one-hour qualification. README and docs distinguish configured budgets, measured evidence and missing model inference.