Spotify URL support for MPRIS OpenUri function (#314)
* Added OpenUri D-BUS MPRIS support. Removed "user:" from URIType check because Spotify doesn't always provide it. * Added tags to .gitignore * Changed mpris metadata to actually return the track's url instead of the Spotify URI so that it matches the functionality of the official Spotify client. * Changed mpris:trackid and xesam:url to not use static naming so it can support podcasts. * Changed xesam:url to default to an empty string instead of "0" * Added possibility to start playing Shows and Episodes via MPRIS. Added possibility to search for Podcast Episodes. * Fixed mpris:trackid not returning the id in the correct format. MPRIS OpenUri function now supports Spotify url links. * return result directly instead of mut string * handle artist URLs/URIs Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
This commit is contained in:
@@ -822,8 +822,8 @@ impl Spotify {
|
||||
self.api_with_retry(|api| api.user_playlist_follow_playlist(&owner_id, &id, true))
|
||||
}
|
||||
|
||||
pub fn artist_top_tracks(&self, id: String) -> Option<Vec<Track>> {
|
||||
self.api_with_retry(|api| api.artist_top_tracks(&id, None))
|
||||
pub fn artist_top_tracks(&self, id: &str) -> Option<Vec<Track>> {
|
||||
self.api_with_retry(|api| api.artist_top_tracks(id, None))
|
||||
.map(|ft| ft.tracks.iter().map(|t| t.into()).collect())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user