user base64 for notify messages as AddonSignals addon has changed from hex string to base64
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.embycon"
|
||||
name="EmbyCon"
|
||||
version="1.9.55"
|
||||
version="1.9.56"
|
||||
provider-name="Team B">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.25.0"/>
|
||||
|
||||
@@ -4,7 +4,6 @@ import time
|
||||
import threading
|
||||
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
|
||||
from .simple_logging import SimpleLogging
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Gnu General Public License - see LICENSE.TXT
|
||||
|
||||
import xbmcaddon
|
||||
import xbmcplugin
|
||||
import xbmcgui
|
||||
@@ -158,7 +160,9 @@ def getContent(url, params):
|
||||
xbmcplugin.endOfDirectory(pluginhandle, cacheToDisc=False)
|
||||
|
||||
# send display items event
|
||||
|
||||
display_items_notification = {"view_type": view_type}
|
||||
log.debug("Sending display_items with data {0}", display_items_notification)
|
||||
send_event_notification("display_items", display_items_notification)
|
||||
|
||||
if (progress != None):
|
||||
|
||||
@@ -8,11 +8,6 @@ import cProfile
|
||||
import pstats
|
||||
import json
|
||||
import StringIO
|
||||
import encodings
|
||||
import binascii
|
||||
import re
|
||||
import hashlib
|
||||
import cPickle
|
||||
|
||||
import xbmcplugin
|
||||
import xbmcgui
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
# Gnu General Public License - see LICENSE.TXT
|
||||
|
||||
import binascii
|
||||
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
import xbmcaddon
|
||||
import xbmcvfs
|
||||
|
||||
from datetime import timedelta
|
||||
from datetime import datetime
|
||||
import json
|
||||
import os
|
||||
import base64
|
||||
|
||||
from .simple_logging import SimpleLogging
|
||||
from .downloadutils import DownloadUtils
|
||||
@@ -1215,9 +1212,9 @@ class PlaybackService(xbmc.Monitor):
|
||||
return
|
||||
|
||||
data_json = json.loads(data)
|
||||
hex_data = data_json[0]
|
||||
log.debug("PlaybackService:onNotification:{0}", hex_data)
|
||||
decoded_data = binascii.unhexlify(hex_data)
|
||||
message_data = data_json[0]
|
||||
log.debug("PlaybackService:onNotification:{0}", message_data)
|
||||
decoded_data = base64.b64decode(message_data)
|
||||
play_info = json.loads(decoded_data)
|
||||
|
||||
if signal == "embycon_play_action":
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
# Gnu General Public License - see LICENSE.TXT
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
import xbmcplugin
|
||||
import xbmc
|
||||
|
||||
import string
|
||||
import random
|
||||
import urllib
|
||||
import json
|
||||
import binascii
|
||||
import base64
|
||||
import time
|
||||
from datetime import datetime
|
||||
import _strptime
|
||||
@@ -311,10 +309,11 @@ def single_urlencode(text):
|
||||
|
||||
|
||||
def send_event_notification(method, data):
|
||||
next_data = json.dumps(data)
|
||||
message_data = json.dumps(data)
|
||||
source_id = "embycon"
|
||||
data = '\\"[\\"{0}\\"]\\"'.format(binascii.hexlify(next_data))
|
||||
command = 'XBMC.NotifyAll({0}.SIGNAL,{1},{2})'.format(source_id, method, data)
|
||||
base64_data = base64.b64encode(message_data)
|
||||
escaped_data = '\\"[\\"{0}\\"]\\"'.format(base64_data)
|
||||
command = 'XBMC.NotifyAll({0}.SIGNAL,{1},{2})'.format(source_id, method, escaped_data)
|
||||
log.debug("Sending notification event data: {0}", command)
|
||||
xbmc.executebuiltin(command)
|
||||
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
# Gnu General Public License - see LICENSE.TXT
|
||||
|
||||
import time
|
||||
import json
|
||||
import traceback
|
||||
import binascii
|
||||
from threading import Timer
|
||||
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
|
||||
from resources.lib.downloadutils import DownloadUtils, save_user_details
|
||||
from resources.lib.simple_logging import SimpleLogging
|
||||
|
||||
Reference in New Issue
Block a user