Skip to content

Commit cf71bc2

Browse files
mgoltzscheGStreamer Marge Bot
authored andcommitted
spotify: bump librespot 0.8.0
Fixes the Spotify integration by using Spotify's extended metadata endpoint, see librespot-org/librespot#1622 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2688>
1 parent 224ab3e commit cf71bc2

File tree

5 files changed

+73
-97
lines changed

5 files changed

+73
-97
lines changed

Cargo.lock

Lines changed: 48 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

audio/spotify/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ rust-version.workspace = true
1111
[dependencies]
1212
gst.workspace = true
1313
gst-base.workspace = true
14-
librespot-core = { version = "0.7", default-features = false, features = [
14+
librespot-core = { version = "0.8", default-features = false, features = [
1515
"rustls-tls-native-roots",
1616
] }
17-
librespot-metadata = { version = "0.7", default-features = false }
18-
librespot-playback = { version = "0.7", default-features = false, features = [
17+
librespot-metadata = { version = "0.8", default-features = false }
18+
librespot-playback = { version = "0.8", default-features = false, features = [
1919
'passthrough-decoder',
2020
] }
2121
tokio = { version = "1.0", features = ["rt-multi-thread"] }

audio/spotify/src/common.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ use gst::prelude::*;
1313

1414
use futures::future::{AbortHandle, Aborted};
1515
use librespot_core::{
16-
authentication::Credentials, cache::Cache, config::SessionConfig, session::Session,
17-
spotify_id::SpotifyId,
16+
authentication::Credentials, cache::Cache, config::SessionConfig, session::Session, SpotifyUri,
1817
};
1918

2019
#[derive(Default, Debug, Clone)]
@@ -159,11 +158,11 @@ impl Settings {
159158
Ok(session)
160159
}
161160

162-
pub fn track_id(&self) -> anyhow::Result<SpotifyId> {
161+
pub fn track_uri(&self) -> anyhow::Result<SpotifyUri> {
163162
if self.track.is_empty() {
164163
bail!("track is not set");
165164
}
166-
let track = SpotifyId::from_uri(&self.track)?;
165+
let track = SpotifyUri::from_uri(&self.track)?;
167166

168167
Ok(track)
169168
}

audio/spotify/src/spotifyaudiosrc/imp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl SpotifyAudioSrc {
390390
};
391391

392392
let session = common.connect_session(src.clone(), &CAT).await?;
393-
let track = common.track_id()?;
393+
let track = common.track_uri()?;
394394
gst::debug!(CAT, imp = self, "Requesting bitrate {:?}", bitrate);
395395

396396
(session, track, bitrate)

0 commit comments

Comments
 (0)