mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
parent
f943316d25
commit
84fcecb2b3
1 changed files with 6 additions and 5 deletions
|
@ -13,7 +13,7 @@ from uuid import uuid4
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
from dateutil import tz, parser
|
from dateutil import tz, parser
|
||||||
from six import text_type, string_types, iteritems
|
from six import text_type, string_types, iteritems, ensure_text, ensure_binary
|
||||||
from six.moves.urllib.parse import quote_plus
|
from six.moves.urllib.parse import quote_plus
|
||||||
|
|
||||||
from kodi_six import xbmc, xbmcaddon, xbmcgui, xbmcvfs
|
from kodi_six import xbmc, xbmcaddon, xbmcgui, xbmcvfs
|
||||||
|
@ -137,12 +137,13 @@ def event(method, data=None, sender=None, hexlify=False):
|
||||||
sender = sender or "plugin.video.jellyfin"
|
sender = sender or "plugin.video.jellyfin"
|
||||||
|
|
||||||
if hexlify:
|
if hexlify:
|
||||||
data = '\\"[\\"{0}\\"]\\"'.format(binascii.hexlify(json.dumps(data)))
|
data = ensure_text(binascii.hexlify(ensure_binary(json.dumps(data))))
|
||||||
else:
|
|
||||||
data = '"[%s]"' % json.dumps(data).replace('"', '\\"')
|
data = '"[%s]"' % json.dumps(data).replace('"', '\\"')
|
||||||
|
|
||||||
|
LOG.debug("---[ event: %s/%s ] %s", sender, method, data)
|
||||||
|
|
||||||
xbmc.executebuiltin('NotifyAll(%s, %s, %s)' % (sender, method, data))
|
xbmc.executebuiltin('NotifyAll(%s, %s, %s)' % (sender, method, data))
|
||||||
LOG.debug("---[ event: %s/%s ] %s", sender, method, data)
|
|
||||||
|
|
||||||
|
|
||||||
def dialog(dialog_type, *args, **kwargs):
|
def dialog(dialog_type, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue