Merge pull request #1070 from wholivesinapineappleunderthesea/dev

Fix play track item_type in the examples folder
This commit is contained in:
Roderick van Domburg 2022-11-04 07:58:11 +01:00 committed by GitHub
commit 2c20669a5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@ use std::{env, process::exit};
use librespot::{
core::{
authentication::Credentials, config::SessionConfig, session::Session, spotify_id::SpotifyId,
authentication::Credentials, config::SessionConfig, session::Session, spotify_id::{SpotifyId, SpotifyItemType},
},
playback::{
audio_backend,
@ -25,7 +25,8 @@ async fn main() {
}
let credentials = Credentials::with_password(&args[1], &args[2]);
let track = SpotifyId::from_base62(&args[3]).unwrap();
let mut track = SpotifyId::from_base62(&args[3]).unwrap();
track.item_type = SpotifyItemType::Track;
let backend = audio_backend::find(None).unwrap();