Skip to content

Lazy TUI Playlist - #785

Merged
tramhao merged 18 commits into
tramhao:masterfrom
hasezoey:lazyTUIPlaylist
Sep 21, 2026
Merged

tramhao merged 18 commits into
tramhao:masterfrom
hasezoey:lazyTUIPlaylist

Conversation

@hasezoey

@hasezoey hasezoey commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

This PR makes the TUI Playlist lazy loading.

Currently known limitations:

  • Playlist Total Duration had to be disabled (as we now not have access to all of the durations at load)
    • i intend to fix this in a future PR which implements the lazy playlist serverside and the TUI can load this info via protobuf
  • Playlist Search is very slow (as it has to load all the playlist data, as before, just it is now the only all consumer)
    • i intend to fix this by allowing search on the id (path / url) while loading the data, and even after it is loaded allow to search on the id, but at a lower weight

I would appreciate some additional testing before this is being merged.

Notes about the implementation:

  • anything that requires access to the current track's information, either will:
    • load the info on next redraw (playlist), or
    • has to be manually told to re-load its data (update_photo, lyric_title, "Currently Playing" message)
  • the track info loader (TMPTrackLoadMsg) is a temporary helper actor until the info can be loaded from the server via protobuf

Depends on #784
re #493

Tagging @Porkepix in case you are interested to test this change.

Temporay because this should be asked from the server.
As that adds a "CancellationToken" "PartialEq" impl
As it is not necessary and not compatible with next few commits.
As they are practically never used.
Slightly less cloning and slightly less data to move around. More ergonomic.
So that it does not load more than necessary, if canceled (eg. TUI quit)
Currently known issue: Playlist Total Duration is hard-coded to be unknown.
…HashSet"

To ensure no duplicates are loaded.
@tramhao
tramhao merged commit c3889e7 into tramhao:master Sep 21, 2026
9 checks passed
@hasezoey
hasezoey deleted the lazyTUIPlaylist branch September 21, 2026 08:56
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.

2 participants