Support up next

This commit is contained in:
angelblue05 2018-10-15 06:26:11 -05:00
parent 5808c449c4
commit c3fbdf082c
5 changed files with 110 additions and 18 deletions

View file

@ -46,7 +46,8 @@ def set_properties(item, method, server_id=None):
'SubsMapping': info.get('Subtitles'),
'AudioStreamIndex': info.get('AudioStreamIndex'),
'SubtitleStreamIndex': info.get('SubtitleStreamIndex'),
'CurrentPosition': info.get('CurrentPosition')
'CurrentPosition': info.get('CurrentPosition'),
'CurrentEpisode': info.get('CurrentEpisode')
})
window('emby_play.json', current)
@ -400,6 +401,14 @@ class PlayUtils(object):
}
if settings('transcode_h265.bool'):
profile['DirectPlayProfiles'][0]['VideoCodec'] = "h264,mpeg4,mpeg2video"
else:
profile['TranscodingProfiles'].insert(0, {
"Container": "m3u8",
"Type": "Video",
"AudioCodec": "aac,mp3,ac3,opus,flac,vorbis",
"VideoCodec": "h264,h265,hevc,mpeg4,mpeg2video",
"MaxAudioChannels": "6"
})
if settings('transcodeHi10P.bool'):
profile['CodecProfiles'].append(

View file

@ -2,6 +2,7 @@
#################################################################################################
import binascii
import json
import logging
import os
@ -127,13 +128,20 @@ def find(dict, item):
if re.match(key, item, re.I):
return dict[key]
def event(method, data=None):
def event(method, data=None, sender=None, hexlify=False):
''' Data is a dictionary.
'''
data = data or {}
xbmc.executebuiltin('NotifyAll(plugin.video.emby, %s, "[%s]")' % (method, json.dumps(data).replace('"', '\\"')))
LOG.debug("---[ event: %s ] %s", method, data)
sender = sender or "plugin.video.emby"
if hexlify:
data = '\\"[\\"{0}\\"]\\"'.format(binascii.hexlify(json.dumps(data)))
else:
data = '"[%s]"' % json.dumps(data).replace('"', '\\"')
xbmc.executebuiltin('NotifyAll(%s, %s, %s)' % (sender, method, data))
LOG.debug("---[ event: %s/%s ] %s", sender, method, data)
def dialog(dialog_type, *args, **kwargs):