[PR #920] [MERGED] feat: Add config field for custom 'explicit' icon #1860

Closed
opened 2026-03-14 15:36:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/920
Author: @zenonet
Created: 2/8/2026
Status: Merged
Merged: 2/10/2026
Merged by: @aome510

Base: masterHead: master


📝 Commits (5)

  • 5b332a8 Added explicit icon config and implemented it for the list view
  • dc427d0 Implemented custom explicit icon playback text.
  • 90561db Added documentation about the new config field
  • cc39963 Merge branch 'master' into master
  • afad2bc fmt

📊 Changes

4 files changed (+16 additions, -9 deletions)

View changed files

📝 docs/config.md (+2 -1)
📝 spotify_player/src/config/mod.rs (+2 -0)
📝 spotify_player/src/state/model.rs (+6 -1)
📝 spotify_player/src/ui/playback.rs (+6 -7)

📄 Description

I added the explicit_icon config field which can be used to customize how explicit tracks are rendered. For example, you can use a custom Unicode character or remove the explicit marker entirely (by specifying an empty string).

This is basically an extension of #276.

I also removed a little code duplication by transforming the FullTrack into a Track and then using its display_name() method when constructing the playback string.

I've used an unwrap in playback.rs on line 263. I think it should be fine since Track::try_from_full_track only fails if the track is not playable but i think this should never be the case for Track that makes it into the playback.

The behavior is not changed by default. The default explicit icon is still (E).

I also added the new config option to the config doc and added a note with some example chars that might be used. Not sure if you want that there.


🔄 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/920 **Author:** [@zenonet](https://github.com/zenonet) **Created:** 2/8/2026 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (5) - [`5b332a8`](https://github.com/aome510/spotify-player/commit/5b332a81b50990cb02945c4036a6c2ba0af86295) Added explicit icon config and implemented it for the list view - [`dc427d0`](https://github.com/aome510/spotify-player/commit/dc427d01d858f7968f3bb0dcea32616c7300a8a1) Implemented custom explicit icon playback text. - [`90561db`](https://github.com/aome510/spotify-player/commit/90561dbf96330677873b7240287777734fb8596e) Added documentation about the new config field - [`cc39963`](https://github.com/aome510/spotify-player/commit/cc3996324301963d45e751eb7635c5511ea31da5) Merge branch 'master' into master - [`afad2bc`](https://github.com/aome510/spotify-player/commit/afad2bcb70b248d9d4cb76aa20956ea99e43fe53) fmt ### 📊 Changes **4 files changed** (+16 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `docs/config.md` (+2 -1) 📝 `spotify_player/src/config/mod.rs` (+2 -0) 📝 `spotify_player/src/state/model.rs` (+6 -1) 📝 `spotify_player/src/ui/playback.rs` (+6 -7) </details> ### 📄 Description I added the `explicit_icon` config field which can be used to customize how explicit tracks are rendered. For example, you can use a custom Unicode character or remove the explicit marker entirely (by specifying an empty string). This is basically an extension of #276. I also removed a little code duplication by transforming the `FullTrack` into a `Track` and then using its `display_name()` method when constructing the playback string. I've used an unwrap in playback.rs on line 263. I think it should be fine since `Track::try_from_full_track` only fails if the track is not `playable` but i think this should never be the case for Track that makes it into the playback. The behavior is not changed by default. The default explicit icon is still `(E)`. I also added the new config option to the config doc and added a note with some example chars that might be used. Not sure if you want that there. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 15:36:56 +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#1860
No description provided.