We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7de2aad commit 923fd32Copy full SHA for 923fd32
src/dbus_mpris.rs
@@ -751,7 +751,10 @@ fn register_player_interface(
751
Ok::<_, librespot_core::Error>(match uri {
752
SpotifyUri::Track { .. } => {
753
let track = Track::get(&session, &uri).await?;
754
- (track.number as u32, track.album.id.to_uri()?)
+ if track.number == 0 {
755
+ warn!("track.number is not expected to be 0- but 1-indexed");
756
+ }
757
+ ((track.number - 1).max(0) as u32, track.album.id.to_uri()?)
758
}
759
SpotifyUri::Album { .. }
760
| SpotifyUri::Artist { .. }
0 commit comments