Files
musyx/README.md
T
Yuriy Panov e2312f2d40 feat: likes, track actions, playlist editing, lyrics and queue sync
- ym-api: like/unlike tracks, albums, artists and playlists; dislike
  tracks; liked ids for drawing state; create, rename, publish/hide and
  delete playlists; add, remove and move tracks (fresh revision per edit);
  lyrics (LRC parsed, plain text fallback); server queues
- Hearts on every track row, the player bar and album, artist and
  playlist pages, applied at once and re-read if Yandex refuses
- Track menu: Play next (moves a queued track up rather than duplicating
  it; the playing track's menu offers Next track instead), Add to queue,
  like, Add to playlist or a new one, Go to album/artist, Don't recommend,
  and Move up/down/Remove on the user's own playlists
- New playlist from the sidebar; Rename, Make public/private and Delete
  (confirmed) on own playlist pages; short status messages for every edit
- Lyrics panel highlights and follows the sung line and seeks on click
- Lists played are published as Yandex queues and their position kept
- lyricsInfo decides lyrics availability (the old flag over-reports)
- MUSYX_TRACE=1 logs user actions with the resulting queue
- Headless UI tests (iced_test) click through menus over the full window
2026-10-15 16:09:12 +06:00

70 lines
2.6 KiB
Markdown

# Musyx
A desktop player for Yandex Music, written in Rust with [iced](https://iced.rs).
Musyx is an unofficial client. It talks to the same undocumented API the official apps use,
and it isn't affiliated with or endorsed by Yandex.
## Layout
- `crates/ym-api`: the Yandex Music API client, with no UI dependencies.
- `crates/musyx`: the iced app (screens, widgets, player, theme).
- `design/mockup.html`: the approved design. `DESIGN.md` records its tokens.
## Run
```sh
cargo run -p musyx
```
### Sign-in
Musyx signs in with Yandex's device flow. It shows a code, you confirm it at the page Yandex
names (or scan the QR code), and the app picks up the token on its own. You can also paste an
existing OAuth token. The token is kept in the system keychain (service `musyx`, account
`yandex-music`) and refreshed when it is within a week of expiring. Signing out deletes it.
Sign-in uses the public OAuth client id of the official Android app (through
[`yamuse`](https://crates.io/crates/yamuse)), because the music API doesn't accept
third-party apps. On macOS an unsigned dev build may ask for keychain access again after
each rebuild, because the keychain ties access to the binary's signature.
## Check
```sh
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
```
Snapshot mode renders one screen to a PNG through iced's own screenshot, so it needs no
screen-recording permission:
```sh
MUSYX_SNAPSHOT=design/shots/home.png MUSYX_SNAPSHOT_ROUTE=home MUSYX_SNAPSHOT_THEME=dark \
cargo run -p musyx --features snapshot
```
`MUSYX_SNAPSHOT_ROUTE` takes home, wave, search, collection, podcasts, settings or signin. Every
route except signin renders with a sample signed-in account, so no network or keychain is needed.
`MUSYX_SNAPSHOT_DRAWER` takes queue or lyrics. `MUSYX_SNAPSHOT_THEME` takes light or dark.
`MUSYX_SNAPSHOT_LIVE=1` signs in with the account stored in the keychain instead of using sample
data. Set `MUSYX_SNAPSHOT_DELAY` (ms) to wait longer for slow pages.
`cargo run -p musyx --example api_probe` calls the discovery endpoints with the stored account
(read-only) and prints what came back.
### Tracing
`MUSYX_TRACE=1 cargo run -p musyx` logs each user action (not playback ticks or cover loads)
to stderr, followed by what's playing and the next three tracks.
### Audio
`cargo run -p musyx --example audio_probe` lists the output devices and checks that each one
opens. Use it when the player bar says no sound output was found.
## Licences
Musyx is MIT. Onest and Unbounded are OFL (`crates/musyx/assets/fonts`), and Lucide icons
are ISC (`crates/musyx/assets/icons/LICENSE.txt`).