mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[PR #920] [MERGED] feat: Add config field for custom 'explicit' icon #922
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#922
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:master📝 Commits (5)
5b332a8Added explicit icon config and implemented it for the list viewdc427d0Implemented custom explicit icon playback text.90561dbAdded documentation about the new config fieldcc39963Merge branch 'master' into masterafad2bcfmt📊 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_iconconfig 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
FullTrackinto aTrackand then using itsdisplay_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_trackonly fails if the track is notplayablebut 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.