Skip to content

feat: playlist folder navigation in the "Add Track To Playlist" picker#360

Merged
LargeModGames merged 1 commit into
LargeModGames:mainfrom
Ritze03:feat/playlist-picker-folders
Jul 10, 2026
Merged

feat: playlist folder navigation in the "Add Track To Playlist" picker#360
LargeModGames merged 1 commit into
LargeModGames:mainfrom
Ritze03:feat/playlist-picker-folders

Conversation

@Ritze03

@Ritze03 Ritze03 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The w "Add Track To Playlist" dialog now supports Spotify playlist folders like the sidebar Playlists panel: 📁 folder rows are shown scoped to the current folder level, Enter descends into a folder, the row goes back up, and Enter on a playlist adds the track as before. Only editable (owned or collaborative) playlists are offered, and the "Playlist Folders First" setting (behavior.group_folders_first) orders the dialog too.

If folder data is unavailable (librespot rootlist fetch fails, or a build without native streaming), the dialog falls back to the previous flat list.

Closes #359.

Testing

  • cargo fmt --all — clean
  • cargo clippy --no-default-features --features telemetry -- -D warnings — clean
  • cargo test --no-default-features --features telemetry — 386 passed, including two new tests: folder navigation with non-editable playlists filtered out, and folders-first ordering in the picker
  • cargo build (full streaming build) — compiles
  • Manual: full build with a real Spotify library — folders render, descend/back navigation works, adding a track from inside a folder works
  • Manual fallback check: temporarily discarded the fetched rootlist to simulate librespot failing — dialog degrades to the flat editable list, no crash

Additional notes

  • No behavior change for other sources: YouTube keeps its flat local-playlist picker (folder rows can't appear there), and Local/Subsonic/Radio use the same Spotify-destination path as before, now folder-aware. The Local sidebar's folder list is separate state (local_playlists) and is untouched.
  • A folder containing only non-editable playlists shows just its back row; pruning such folders is deliberately skipped for now.
  • CHANGELOG updated under [Unreleased].

@Ritze03

Ritze03 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Screenshot:
image

@LargeModGames LargeModGames merged commit edea279 into LargeModGames:main Jul 10, 2026
11 checks passed
LargeModGames added a commit that referenced this pull request Jul 10, 2026
…avigation, and custom screens (#363)

## What's new

A major expansion of the Lua plugin API (v4 shipped in #302), made this
a while ago but forgot to merge it:

- **Async data reads**: `get_playlists`, `get_queue`,
`get_search_results`, `get_saved_tracks`/`albums`/`shows`,
`get_recently_played`, `get_devices`, `get_lyrics`, all with the `(data,
err)` callback convention.
- **More actions**: `set_repeat`/`cycle_repeat`, `transfer_playback`,
`play_uri`/`play_context`, `add_to_queue`, playlist create/edit, and
save/follow actions.
- **Timers**: `set_timeout`, `set_interval`, `cancel_timer`.
- **Per-plugin storage**: JSON-backed
`storage_get`/`set`/`remove`/`keys`.
- **Navigation**: `navigate`, `back`, `current_route`, plus a `config()`
read of the user config.
- **New events**: `shuffle_change`, `repeat_change`, `device_change`,
`search_results`, `route_change`.
- **Custom screens**:
`register_screen`/`set_screen`/`show_screen`/`close_screen` with
paragraph/list/gauge widgets and per-key callbacks (new
`RouteId::PluginScreen` / `ActiveBlock::PluginScreen`,
`src/tui/ui/plugin_screen.rs`, example plugin
`examples/plugins/queue-browser.lua`).

Documented in `docs/scripting.md`.

## Notes

- Rebased onto current main (post #360 and #361); the new Stats and
RecapPrompt routes got plugin-facing names in the exhaustive
`route_name` map.
- `get_recently_played` gained a `navigate` flag so plugin data reads
don't hijack the current screen; the handler path still navigates as
before.

## Testing

- `cargo fmt`, `cargo clippy -- -D warnings` (with and without
`scripting`), and `cargo test --no-default-features --features
telemetry,scripting` (572 tests) all pass.
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.

Playlist folder support in the "Add Track To Playlist" dialog

2 participants