[GH-ISSUE #146] customize format of playback_track and playback_album #68

Closed
opened 2026-03-02 23:44:14 +03:00 by kerem · 1 comment
Owner

Originally created by @sewnie on GitHub (Feb 23, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/146

Is your feature request related to a problem? Please describe.
this is not related to a problem, this is simply a style choice.

Describe the solution you'd like
in the current tui and notification scheme:

track • artist
album

Describe alternatives you've considered
what i suggest:

track
artist - album

^^ in the scheme of the spotify notification

Originally created by @sewnie on GitHub (Feb 23, 2023). Original GitHub issue: https://github.com/aome510/spotify-player/issues/146 **Is your feature request related to a problem? Please describe.** this is not related to a problem, this is simply a style choice. **Describe the solution you'd like** in the current tui and notification scheme: ``` track • artist album ``` **Describe alternatives you've considered** what i suggest: ``` track artist - album ``` ^^ in the scheme of the spotify notification
kerem 2026-03-02 23:44:14 +03:00
Author
Owner

@sewnie commented on GitHub (Feb 23, 2023):

diff --git a/spotify_player/src/client/mod.rs b/spotify_player/src/client/mod.rs
index 529e7d2..185d2be 100644
--- a/spotify_player/src/client/mod.rs
+++ b/spotify_player/src/client/mod.rs
@@ -1110,12 +1110,12 @@ impl Client {
                             .to_str()
                             .unwrap(),
                     )
-                    .summary(&format!(
-                        "{} • {}",
-                        track.name,
-                        crate::utils::map_join(&track.artists, |a| &a.name, ", ")
-                    ))
-                    .body(&track.album.name);
+                    .summary(&track.name)
+                    .body(&format!(
+                         "{} - {}",
+                         crate::utils::map_join(&track.artists, |a| &a.name, ", "),
+                         &track.album.name,
+                    ));
 
                 n.show()?;
             }
diff --git a/spotify_player/src/ui/playback.rs b/spotify_player/src/ui/playback.rs
index eff0515..49ecb6f 100644
--- a/spotify_player/src/ui/playback.rs
+++ b/spotify_player/src/ui/playback.rs
@@ -150,19 +150,27 @@ fn render_playback_metadata(
     let playback_info = vec![
         Span::styled(
             format!(
-                "{} {} • {}",
+                "{} {}",
                 if !playback.is_playing {
                     &state.app_config.pause_icon
                 } else {
                     &state.app_config.play_icon
                 },
                 track.name,
-                crate::utils::map_join(&track.artists, |a| &a.name, ", ")
+
             ),
             ui.theme.playback_track(),
         )
         .into(),
-        Span::styled(track.album.name.to_string(), ui.theme.playback_album()).into(),
+        Span::styled(
+            format!(
+               "{} - {}",
+               crate::utils::map_join(&track.artists, |a| &a.name, ", "),
+               track.album.name.to_string(),
+            ),
+            ui.theme.playback_album(),
+        )
+        .into(),
         Span::styled(
             format!(
                 "repeat: {} | shuffle: {} | volume: {}% | device: {}",
<!-- gh-comment-id:1441223375 --> @sewnie commented on GitHub (Feb 23, 2023): ```diff diff --git a/spotify_player/src/client/mod.rs b/spotify_player/src/client/mod.rs index 529e7d2..185d2be 100644 --- a/spotify_player/src/client/mod.rs +++ b/spotify_player/src/client/mod.rs @@ -1110,12 +1110,12 @@ impl Client { .to_str() .unwrap(), ) - .summary(&format!( - "{} • {}", - track.name, - crate::utils::map_join(&track.artists, |a| &a.name, ", ") - )) - .body(&track.album.name); + .summary(&track.name) + .body(&format!( + "{} - {}", + crate::utils::map_join(&track.artists, |a| &a.name, ", "), + &track.album.name, + )); n.show()?; } diff --git a/spotify_player/src/ui/playback.rs b/spotify_player/src/ui/playback.rs index eff0515..49ecb6f 100644 --- a/spotify_player/src/ui/playback.rs +++ b/spotify_player/src/ui/playback.rs @@ -150,19 +150,27 @@ fn render_playback_metadata( let playback_info = vec![ Span::styled( format!( - "{} {} • {}", + "{} {}", if !playback.is_playing { &state.app_config.pause_icon } else { &state.app_config.play_icon }, track.name, - crate::utils::map_join(&track.artists, |a| &a.name, ", ") + ), ui.theme.playback_track(), ) .into(), - Span::styled(track.album.name.to_string(), ui.theme.playback_album()).into(), + Span::styled( + format!( + "{} - {}", + crate::utils::map_join(&track.artists, |a| &a.name, ", "), + track.album.name.to_string(), + ), + ui.theme.playback_album(), + ) + .into(), Span::styled( format!( "repeat: {} | shuffle: {} | volume: {}% | device: {}", ```
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#68
No description provided.