Add a switch in the statistics view to show all songs instead of the soundtrack cards: a list of every song with its soundtrack. The list can be searched, filtered and sorted like the cards.
Feasibility
Yes, client only. MusicServerClient.fetch_soundtrack_statistics already returns every soundtrack with its songs (SoundtrackWithSongs.songs: Array[SongInfoForStats]), so the songs mode needs no new endpoint.
Plan
Switch.statistics/StatisticsView.tscn: a Soundtracks / Songs switch in the toolbar, next to the show and sort menus, e.g. two TabButton-styled buttons in a ButtonGroup or a CheckButton.
Songs list.
A new SongStatsList scene shown instead of CardGrid in songs mode.
It's a ScrollContainer with one row per song: song name, soundtrack name (dimmer), times played and last played, if the server sends it for songs (check SongInfoForStats).
Rows use ListRowEven/ListRowOdd, like the other lists.
With thousands of songs, building every row is slow. Build rows once and only toggle visible on filter, like the cards. If it is still slow, only make the rows that are on screen.
Search. Matches the song name and the soundtrack name (reuse SoundtrackSearch, which has the loose "lttp" matching), with the matching letters highlighted like in the Search popup.
Show filter. All / Played / Never played, on the song's times_played.
Sort.
A–Z and Z–A by song name.
Most played and least played.
Maybe also "By soundtrack".
Click. Clicking a row opens SoundtrackStatsPopup for its soundtrack.
Count label. "%d of %d songs".
Remember the choice. The chosen mode is remembered for the session (or saved in settings.cfg under [app]).
Tests
Switching modes shows and hides the right container.
Search finds songs by song name and by soundtrack name.
Filter and sort give the right order (unit test the comparison, like _comes_before).
Question
Should the song list show "last played" per song? Only if the server already sends it per song; otherwise it's a small MusicServer change.
Add a switch in the statistics view to show all songs instead of the soundtrack cards: a list of every song with its soundtrack. The list can be searched, filtered and sorted like the cards.
## Feasibility
Yes, client only. `MusicServerClient.fetch_soundtrack_statistics` already returns every soundtrack with its songs (`SoundtrackWithSongs.songs: Array[SongInfoForStats]`), so the songs mode needs no new endpoint.
## Plan
- **Switch.** `statistics/StatisticsView.tscn`: a Soundtracks / Songs switch in the toolbar, next to the show and sort menus, e.g. two `TabButton`-styled buttons in a ButtonGroup or a CheckButton.
- **Songs list.**
- A new `SongStatsList` scene shown instead of `CardGrid` in songs mode.
- It's a ScrollContainer with one row per song: song name, soundtrack name (dimmer), times played and last played, if the server sends it for songs (check `SongInfoForStats`).
- Rows use `ListRowEven`/`ListRowOdd`, like the other lists.
- With thousands of songs, building every row is slow. Build rows once and only toggle `visible` on filter, like the cards. If it is still slow, only make the rows that are on screen.
- **Search.** Matches the song name and the soundtrack name (reuse `SoundtrackSearch`, which has the loose "lttp" matching), with the matching letters highlighted like in the Search popup.
- **Show filter.** All / Played / Never played, on the song's `times_played`.
- **Sort.**
- A–Z and Z–A by song name.
- Most played and least played.
- Maybe also "By soundtrack".
- **Click.** Clicking a row opens `SoundtrackStatsPopup` for its soundtrack.
- **Count label.** "%d of %d songs".
- **Remember the choice.** The chosen mode is remembered for the session (or saved in `settings.cfg` under `[app]`).
## Tests
- Switching modes shows and hides the right container.
- Search finds songs by song name and by soundtrack name.
- Filter and sort give the right order (unit test the comparison, like `_comes_before`).
## Question
- Should the song list show "last played" per song? Only if the server already sends it per song; otherwise it's a small MusicServer change.
Sansan
added the feature label 2026-10-09 16:06:04 +02:00
Done in a4e6da4 and 84e137e on develop. The song list only shows played songs, and there is no last played column, since the server doesn't send that per song.
Done in a4e6da4 and 84e137e on develop. The song list only shows played songs, and there is no last played column, since the server doesn't send that per song.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Add a switch in the statistics view to show all songs instead of the soundtrack cards: a list of every song with its soundtrack. The list can be searched, filtered and sorted like the cards.
Feasibility
Yes, client only.
MusicServerClient.fetch_soundtrack_statisticsalready returns every soundtrack with its songs (SoundtrackWithSongs.songs: Array[SongInfoForStats]), so the songs mode needs no new endpoint.Plan
statistics/StatisticsView.tscn: a Soundtracks / Songs switch in the toolbar, next to the show and sort menus, e.g. twoTabButton-styled buttons in a ButtonGroup or a CheckButton.SongStatsListscene shown instead ofCardGridin songs mode.SongInfoForStats).ListRowEven/ListRowOdd, like the other lists.visibleon filter, like the cards. If it is still slow, only make the rows that are on screen.SoundtrackSearch, which has the loose "lttp" matching), with the matching letters highlighted like in the Search popup.times_played.SoundtrackStatsPopupfor its soundtrack.settings.cfgunder[app]).Tests
_comes_before).Question
Done in
a4e6da4and84e137eon develop. The song list only shows played songs, and there is no last played column, since the server doesn't send that per song.