forked from platypush/platypush
Some hysterical guy has Spotify has decided to change the playlists URI
format again in the last couple of months with no notice nor back-compatibility plan. Normalizing playlist URIs in the new (or old-old?) format while innerly cursing at the incompetency of Spotify
This commit is contained in:
parent
65d6e5a5f6
commit
1b9094a36b
1 changed files with 3 additions and 3 deletions
|
@ -273,10 +273,10 @@ class MusicMpdPlugin(MusicPlugin):
|
|||
if resource.startswith('spotify:'):
|
||||
resource = resource.split('?')[0]
|
||||
|
||||
if resource.startswith('spotify:playlist:'):
|
||||
m = re.match('spotify:user:[^:]+:playlist:(.+?)')
|
||||
if m:
|
||||
# Old Spotify URI format, convert it to new
|
||||
m = re.match('^spotify:playlist:(.*)$', resource)
|
||||
resource = 'spotify:user:spotify:playlist:' + m.group(1)
|
||||
resource = 'spotify:playlist:' + m.group(1)
|
||||
return resource
|
||||
|
||||
@action
|
||||
|
|
Loading…
Reference in a new issue