mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-17 21:56:13 +00:00
First attempt at supporting theme music
This commit is contained in:
parent
5b0c074279
commit
a6497ce6c7
3 changed files with 80 additions and 4 deletions
|
@ -187,12 +187,16 @@ class PlayUtils():
|
|||
return False
|
||||
|
||||
return True
|
||||
|
||||
def directStream(self, result, server, id):
|
||||
|
||||
def directStream(self, result, server, id, type="Video"):
|
||||
|
||||
try:
|
||||
# Play with Direct Stream
|
||||
playurl = "%s/mediabrowser/Videos/%s/stream?static=true" % (server, id)
|
||||
if type == "Video":
|
||||
# Play with Direct Stream
|
||||
playurl = "%s/mediabrowser/Videos/%s/stream?static=true" % (server, id)
|
||||
elif type == "Audio":
|
||||
playurl = "%s/mediabrowser/Audio/%s/stream.mp3" % (server, id)
|
||||
return playurl
|
||||
|
||||
mediaSources = result[u'MediaSources']
|
||||
if mediaSources[0].get('DefaultAudioStreamIndex') != None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue