本文整理汇总了Python中DownloadUtils.DownloadUtils.postcapabilities方法的典型用法代码示例。如果您正苦于以下问题:Python DownloadUtils.postcapabilities方法的具体用法?Python DownloadUtils.postcapabilities怎么用?Python DownloadUtils.postcapabilities使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DownloadUtils.DownloadUtils
的用法示例。
在下文中一共展示了DownloadUtils.postcapabilities方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_open
# 需要导入模块: from DownloadUtils import DownloadUtils [as 别名]
# 或者: from DownloadUtils.DownloadUtils import postcapabilities [as 别名]
def on_open(self, ws):
clientInfo = ClientInformation()
machineId = clientInfo.getMachineId()
version = clientInfo.getVersion()
messageData = {}
messageData["MessageType"] = "Identity"
addonSettings = xbmcaddon.Addon(id='plugin.video.xbmb3c')
deviceName = addonSettings.getSetting('deviceName')
deviceName = deviceName.replace("\"", "_")
messageData["Data"] = "Kodi|" + machineId + "|" + version + "|" + deviceName
messageString = json.dumps(messageData)
self.logMsg("Opened : " + str(messageString))
ws.send(messageString)
# Set Capabilities
xbmc.log("postcapabilities_called")
downloadUtils = DownloadUtils()
downloadUtils.postcapabilities()