Spotify URL handling improvements (#320)
* Fixed regex for handling links via ctrl+v shortcut. Fixed the whole url getting passed to get data on each link type instead of only the id. Fixed MPRIS OpenUri function not handling an user&id in the link correctly.
This commit is contained in:
@@ -494,7 +494,7 @@ fn run_dbus_server(
|
||||
let uri = match uri_data {
|
||||
Some(s) => {
|
||||
let spotify_uri = if s.contains("open.spotify.com") {
|
||||
let regex = Regex::new(r"https?://open\.spotify\.com(/user)?/(album|track|playlist|show|episode)/(.+)(\?si=\S+)?").unwrap();
|
||||
let regex = Regex::new(r"https?://open\.spotify\.com(/user/\S+)?/(album|track|playlist|show|episode)/(.+)(\?si=\S+)?").unwrap();
|
||||
let captures = regex.captures(s).unwrap();
|
||||
let uri_type = &captures[2];
|
||||
let id = &captures[3];
|
||||
|
||||
Reference in New Issue
Block a user