File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " apple-music"
3
3
authors = [
" Dylan Cattelan <[email protected] " ]
4
- version = " 0.11.1 "
4
+ version = " 0.11.2 "
5
5
edition = " 2021"
6
6
description = " A Rust Library to fully control local MacOS Apple Music player."
7
7
documentation = " https://docs.rs/apple-music/latest"
@@ -20,3 +20,4 @@ env_logger = "0.10.1"
20
20
strum = { version = " 0.25.0" , features = [" derive" ] }
21
21
strum_macros = " 0.25.3"
22
22
reqwest = { version = " 0.11.23" , features = [" blocking" ] }
23
+ urlencoding = " 2.1.3"
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use crate::error::Error;
2
2
use crate :: script_controller:: { ParamType , ScriptController } ;
3
3
use serde:: Deserialize ;
4
4
use std:: io:: Read ;
5
+ use urlencoding:: encode;
5
6
6
7
/// Provides data related to a specific Track as well as its artworks.
7
8
#[ derive( Deserialize , Debug ) ]
@@ -328,14 +329,14 @@ impl Track {
328
329
fn fetch_itunes_store_data ( & mut self ) {
329
330
let request = format ! (
330
331
"https://itunes.apple.com/search?term={}&entity=song&attribute=albumTerm&limit=200" ,
331
- self . album
332
+ encode ( self . album. as_str ( ) )
332
333
) ;
333
334
self . fetch_itunes_store_by_request ( request) ;
334
335
335
336
if self . artwork_url == None {
336
337
let request = format ! (
337
338
"https://itunes.apple.com/search?term={}&entity=song&limit=200" ,
338
- self . name
339
+ encode ( self . album . as_str ( ) )
339
340
) ;
340
341
self . fetch_itunes_store_by_request ( request) ;
341
342
}
You can’t perform that action at this time.
0 commit comments