Commit Graph
11 Commits
Author SHA1 Message Date
yuriy.pandClaude Opus 5.5 5597c4c235 Save My Wave settings as JSON
settings3 now answers a form body with 415 unsupported-media-type,
so every choice reverted to Any.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:00:57 +06:00
yuriy.pandClaude Opus 5.5 05c90c03df Play downloads in Android Auto
Offline, the car showed "Sign in" and nothing to play. It now lists the downloads,
by track and by album or playlist, searches them and plays them by voice; online
they sit under Collection. Their covers come from the copies kept with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:29:49 +06:00
yuriy.pandClaude Opus 5.5 250e721fea Go offline when playback fails without a connection
A track that failed to load, or a station that couldn't fetch more, used to skip
three times and stop, even with downloads on the phone. Now a failure checks for a
connection, and with none the app goes offline: a queue skips to its downloaded
tracks (trying each track once, so a fully missing queue stops with a notice), and
a station, which has nothing more to give offline, gives way to all downloads,
shuffled. Now Playing stays open through the switch and back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:29:49 +06:00
Yuriy PanovandClaude Opus 5.5 d085c169fb Keep the sign-in through a 403 or an expired token
Any 403 counted as a rejected token: one refused track, playlist or CDN file
signed the user out and deleted the stored credentials, and a 403 from
/get-file-info skipped the MP3 fallback. A 403 is now its own error that only
fails that request, and at start-up it shows the unreachable screen with the
credentials kept.

The token was also only refreshed when the app started, so one expiring while
the app ran, as it can on a TV left on for weeks, signed the user out with a
good refresh token in hand. Requests now renew the token on a 401 and try
once more; requests rejected together share one refresh, the rotated tokens
are saved, and only a refused refresh token or a second 401 signs out. The
fix is in core, so the TV app gets it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 11:57:57 +06:00
Yuriy PanovandClaude Opus 5.5 891b1b6efd Open offline at once when there's no connection
With airplane mode on, checking the stored sign-in waited out every retry and
timeout, about 90 seconds on a Galaxy S20, before showing the downloads. The
phone app now tells AppState whether the device has any network, and with none
it goes straight to the offline screen; the network callback signs in again
once a connection appears. The TV keeps trying as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:27:59 +06:00
Yuriy PanovandClaude Opus 5.5 a60194c5a7 Fix moving a track down in a playlist
Yandex reads both operations of a change against the playlist as it was, so
deleting a track and inserting it at the next row's index put it back where
it was. A track moving down is now inserted after the row it passes. Moving
up was already right. The fix is in the shared client, so the TV app gets it
too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 16:27:59 +06:00
Yuriy PanovandClaude Opus 5.5 75a02c61e5 Check the stored sign-in only once at a time
The activity and the playback service both start the app state. When the
first check of the stored sign-in was still running as the service came up,
a second one started and signed in again with a new client. Requests already
made with the first client had their results dropped, and since they still
showed as loading they were never asked for again, so Home and Liked tracks
could stay on "Loading…" after a cold start. A check now waits out one that
is already running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:34:26 +06:00
Yuriy PanovandClaude Opus 5.5 d3b3e139b5 Add offline listening to the phone app
Albums, playlists and Liked tracks get a download button beside the heart,
and every track's menu offers Download or Remove download. Files are fetched
one at a time at the streaming quality, stored decrypted with their covers,
and play from the device even online. A downloaded album, playlist or Liked
tracks follows later changes to it. What's wanted is saved before it's
fetched, so a download cut short resumes when the connection returns or the
app next starts; a foreground service with a progress notification keeps it
going with the screen off.

Collection links to a Downloads page listing what's on the device, with
progress, failures and a retry. When Yandex can't be reached at launch and
something is downloaded, the app opens on that page with the player instead
of the "can't reach" screen, and reconnects by itself when the network
returns. Offline, menus and Now Playing hide what needs a connection, and
lyrics say they can't load instead of waiting forever. Settings shows the
space downloads take and can remove them all.

Another account signing in clears the previous one's downloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:12:34 +06:00
Yuriy PanovandClaude Opus 5.5 c13a4053ac Buffer further ahead on the phone for slow networks
The phone app now keeps up to ten minutes buffered (capped at 48 MB), and after
a stall waits for ten seconds of audio before resuming, so a weak link doesn't
stutter. Once the current track has finished loading, the next one is fetched
into a 256 MB disk cache, still encrypted, so it starts at once.

Both are set by a Buffering passed to AppState; the TV keeps ExoPlayer's defaults
and no audio cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 13:26:43 +06:00
Yuriy PanovandClaude Opus 5.5 729b9b8aef Add a phone app with Android Auto support
:mobile (it.panov.musyx) is a Material 3 phone app over the shared AppState: Home,
My Wave, search, collection, detail pages, Now Playing with queue and lyrics,
and sign-in through Yandex's page in the browser.

Its playback service is a MediaLibraryService, so Android Auto and Automotive
can browse My Wave and stations, Home picks and the collection, search, and
play by voice. Covers reach the car through a content provider limited to
Yandex hosts. Signed out, the car shows a Sign in button, and it reloads when
the session changes.

The session's playlist is now the current track and PlayerCore's next 50, so a
car's queue screen lists them and picking one jumps there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:19:27 +06:00
Yuriy PanovandClaude Opus 5.5 4c978efa80 Split the shared code into a core module
The Yandex Music client, the player, the app state and the stores move from the
TV app to :core (it.panov.musyx.*), so a phone app can build on them. The TV app
becomes :tv with the same application id. CoverHues, SessionPlayer and the
strings the state layer shows move with them; LRCLIB's user agent is set by
each app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 10:07:21 +06:00