[PR #795] [MERGED] add display of genres in playback UI via {genres} #883

Closed
opened 2026-03-03 00:01:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/795
Author: @KUHLwasStolen
Created: 8/5/2025
Status: Merged
Merged: 8/31/2025
Merged by: @aome510

Base: masterHead: display-genres


📝 Commits (6)

  • b4a02ac add display of genres in playback UI via {genres}
  • 470c072 make genre_num an argument to optimize config getting
  • 5ecda7d fix unrelated cargo clippy complaints
  • 5f76595 make cargo clippy happy try 2
  • 98e97e6 move format_genres to ui utils
  • a1249b0 update doc

📊 Changes

9 files changed (+135 additions, -39 deletions)

View changed files

📝 docs/config.md (+38 -35)
📝 examples/app.toml (+2 -1)
📝 spotify_player/src/client/mod.rs (+32 -0)
📝 spotify_player/src/config/mod.rs (+7 -1)
📝 spotify_player/src/config/theme.rs (+13 -0)
📝 spotify_player/src/state/data.rs (+2 -0)
📝 spotify_player/src/state/ui/mod.rs (+1 -1)
📝 spotify_player/src/ui/playback.rs (+13 -1)
📝 spotify_player/src/ui/utils.rs (+27 -0)

📄 Description

As suggested in #145 this pull request adds the functionality to display genres in the playback UI.

The number of genres is adjustable via the genre_num config option.
{genres} can be used in the playback_format config to place the genres where wished.

The genres are formatted as follows (genre_num = 2)

  • 1 genre: "genre1"
  • 2 genres: "genre1, genre2"
  • >= 3 genres: "genre1, genre2, ..."

Here is an example with the default genre_num = 2
2025-08-05-213208

The genres are retrieved for the first/main artist of a track and cached in association to this artist.

closes #145


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/spotify-player/pull/795 **Author:** [@KUHLwasStolen](https://github.com/KUHLwasStolen) **Created:** 8/5/2025 **Status:** ✅ Merged **Merged:** 8/31/2025 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `display-genres` --- ### 📝 Commits (6) - [`b4a02ac`](https://github.com/aome510/spotify-player/commit/b4a02ac2bfb90f897ee7bb438dd7407d8c610feb) add display of genres in playback UI via `{genres}` - [`470c072`](https://github.com/aome510/spotify-player/commit/470c072c8b5626d6f1d281e0678a9619d8817d0f) make `genre_num` an argument to optimize config getting - [`5ecda7d`](https://github.com/aome510/spotify-player/commit/5ecda7de8ed9877d8504285b16e4891c74e0301d) fix unrelated `cargo clippy` complaints - [`5f76595`](https://github.com/aome510/spotify-player/commit/5f7659530796c9c960e76339dfc919fe5c31111a) make `cargo clippy` happy try 2 - [`98e97e6`](https://github.com/aome510/spotify-player/commit/98e97e6aa6e59f160df25c3c179408b6997b38f2) move `format_genres` to ui utils - [`a1249b0`](https://github.com/aome510/spotify-player/commit/a1249b014cb978756b171fa509e8e13422acf753) update doc ### 📊 Changes **9 files changed** (+135 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `docs/config.md` (+38 -35) 📝 `examples/app.toml` (+2 -1) 📝 `spotify_player/src/client/mod.rs` (+32 -0) 📝 `spotify_player/src/config/mod.rs` (+7 -1) 📝 `spotify_player/src/config/theme.rs` (+13 -0) 📝 `spotify_player/src/state/data.rs` (+2 -0) 📝 `spotify_player/src/state/ui/mod.rs` (+1 -1) 📝 `spotify_player/src/ui/playback.rs` (+13 -1) 📝 `spotify_player/src/ui/utils.rs` (+27 -0) </details> ### 📄 Description As suggested in #145 this pull request adds the functionality to display genres in the playback UI. The number of genres is adjustable via the `genre_num` config option. `{genres}` can be used in the `playback_format` config to place the genres where wished. The genres are formatted as follows (`genre_num = 2`) - 1 genre: "genre1" - 2 genres: "genre1, genre2" - \>= 3 genres: "genre1, genre2, ..." Here is an example with the default `genre_num = 2` <img width="1118" height="238" alt="2025-08-05-213208" src="https://github.com/user-attachments/assets/3f2f429a-1336-4607-bad7-0e1c40891dee" /> The genres are retrieved for the first/main artist of a track and cached in association to this artist. closes #145 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 00:01:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#883
No description provided.