1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-05 10:49:40 +02:00

fix: Don't pass unknown URIs from deprecated player methods

This commit is contained in:
Jay Malhotra 2025-08-31 16:51:34 +01:00
parent fea16c2f07
commit 569e3f0f0c
2 changed files with 2 additions and 8 deletions

View file

@ -322,12 +322,6 @@ impl SpotifyUri {
}
}
impl From<SpotifyId> for SpotifyUri {
fn from(id: SpotifyId) -> Self {
Self::Unknown { id }
}
}
impl fmt::Debug for SpotifyUri {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("SpotifyUri")

View file

@ -528,7 +528,7 @@ impl Player {
#[deprecated(since = "0.8.0", note = "use load_uri instead")]
pub fn load(&self, track_id: SpotifyId, start_playing: bool, position_ms: u32) {
self.command(PlayerCommand::Load {
track_id: track_id.into(),
track_id: SpotifyUri::Track { id: track_id },
play: start_playing,
position_ms,
});
@ -545,7 +545,7 @@ impl Player {
#[deprecated(since = "0.8.0", note = "use preload_uri instead")]
pub fn preload(&self, track_id: SpotifyId) {
self.command(PlayerCommand::Preload {
track_id: track_id.into(),
track_id: SpotifyUri::Track { id: track_id },
});
}