Apply stream name filtering logic also to HTTP streams

This commit is contained in:
Fabio Manganiello 2019-01-10 18:01:24 +01:00
parent f156e9c199
commit 2c8099e7ae

View file

@ -360,6 +360,7 @@ class MusicMpdPlugin(MusicPlugin):
track = self._exec('currentsong', return_status=False) track = self._exec('currentsong', return_status=False)
if 'title' in track and ('artist' not in track if 'title' in track and ('artist' not in track
or not track['artist'] or not track['artist']
or re.search('^https?://', track['file'])
or re.search('^tunein:', track['file'])): or re.search('^tunein:', track['file'])):
m = re.match('^\s*(.+?)\s+-\s+(.*)\s*$', track['title']) m = re.match('^\s*(.+?)\s+-\s+(.*)\s*$', track['title'])
if m and m.group(1) and m.group(2): if m and m.group(1) and m.group(2):