Fixed Spotify URIs conversion
This commit is contained in:
parent
b55c070e46
commit
f3bdeaf418
1 changed files with 2 additions and 2 deletions
|
@ -29,8 +29,8 @@ class MediaCtrlPlugin(Plugin):
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_type_and_resource_by_url(cls, url):
|
def _get_type_and_resource_by_url(cls, url):
|
||||||
# MPD/Mopidy media (TODO support more mopidy types)
|
# MPD/Mopidy media (TODO support more mopidy types)
|
||||||
m = re.match('^https://open.spotify.com/([^/]+)/(.*)', url)
|
m = re.search('^https://open.spotify.com/([^?]+)', url)
|
||||||
if m: url = 'spotify:{}:{}'.format(m.group(1), m.group(2))
|
if m: url = 'spotify:{}'.format(m.group(1).replace('/', ':'))
|
||||||
if url.startswith('spotify:') \
|
if url.startswith('spotify:') \
|
||||||
or url.startswith('tunein:') \
|
or url.startswith('tunein:') \
|
||||||
or url.startswith('soundcloud:'):
|
or url.startswith('soundcloud:'):
|
||||||
|
|
Loading…
Reference in a new issue