Upgrade rspotify to 0.11.6
Passing IDs to rspotify still feels a little wonky with their `Id` changes making use of `Cow`. Maybe it can be simplified on our end, but it's a start. Fixes #844 See also: https://github.com/ramsayleung/rspotify/pull/332
This commit is contained in:
@@ -141,6 +141,19 @@ impl From<&PlayableItem> for Playable {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&Playable> for rspotify::prelude::PlayableId<'_> {
|
||||
fn from(p: &Playable) -> Self {
|
||||
match p {
|
||||
Playable::Track(t) => rspotify::prelude::PlayableId::Track(
|
||||
rspotify::model::TrackId::from_id(t.id.clone().unwrap()).unwrap(),
|
||||
),
|
||||
Playable::Episode(e) => rspotify::prelude::PlayableId::Episode(
|
||||
rspotify::model::EpisodeId::from_id(e.id.clone()).unwrap(),
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Playable {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user