-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add explicit tags to track information #276
Conversation
d3f1559
to
6483366
Compare
spotify_player/src/ui/playback.rs
Outdated
if track.explicit { | ||
format!("{} (Explicit)", track.name) | ||
} else { | ||
track.name.clone() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The track
variable here is an rspotify::FullTrack
, not a spotify_player::Track
, so I couldn't reuse the display_name method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I originally tried to implement this functionality at the album level, using the restrictions field on the Album API, but the explicit field was not populated in any of my tests. This seems to match the behavior of the spotify web interface, were there is no explicit marker at the album level, but there is one at the track level.
I actually prefer handling explicitly at the track level because it's possible that a non-explicit album has some explicit tracks.
what are your thoughts on modifying the track title by appending the string (Explicit)
I go ahead to try using the 🅴 Unicode character instead of (Explicit). Not sure how well it is rendered on other platforms. Tested locally:
hmm, look like the unicode is pretty platform-dependent. It's quite hard for me to look 🇪 if using a dark theme. I think we can either revert back to "(Explicit)" text or "(E)" text for short. I'll merge the PR with "(E)" text. lmk if that also works for you. |
Fixes #96.
Adds
(Explicit)
to a track name if Spotify reports it as having explicit lyrics. This can make it easier to know if you're listening to the explicit version or the "radio" version of a song.I originally tried to implement this functionality at the album level, using the
restrictions
field on the Album API, but theexplicit
field was not populated in any of my tests. This seems to match the behavior of the spotify web interface, were there is no explicit marker at the album level, but there is one at the track level.Question for @braheezy (author of #96) and @aome510: what are your thoughts on modifying the track title by appending the string
(Explicit)
? Spotify's web interface obviously handles this a bit differently, adding anE
symbol, but I wasn't sure how to translate that to the spotify_player interface. Another possiblity could be to add another column in the track-list, populating the column withE
for explicit tracks and leaving it blank for non-explicit tracks.Screenshots:
Explicit album track listing:
"Radio" album track listing: