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:
parent
fea16c2f07
commit
569e3f0f0c
2 changed files with 2 additions and 8 deletions
|
@ -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")
|
||||
|
|
|
@ -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 },
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue