Support other music extension for direct stream

This commit is contained in:
angelblue05 2016-09-20 02:57:17 -05:00
parent e7c1d4d623
commit 23b52de9be

View file

@ -2030,7 +2030,12 @@ class Music(Items):
##### GET THE FILE AND PATH ##### ##### GET THE FILE AND PATH #####
if self.directstream: if self.directstream:
path = "%s/emby/Audio/%s/" % (self.server, itemid) path = "%s/emby/Audio/%s/" % (self.server, itemid)
filename = "stream.mp3?static=true" extensions = ['mp3', 'aac', 'ogg', 'oga', 'webma', 'wma', 'flac']
if item['Container'].lower() in extensions:
filename = "stream.%s?static=true" % item['Container']
else:
filename = "stream.mp3?static=true"
else: else:
playurl = API.get_file_path() playurl = API.get_file_path()