diff --git a/kodi/__init__.py b/kodi/__init__.py index 6d654583b..a5f3159d5 100644 --- a/kodi/__init__.py +++ b/kodi/__init__.py @@ -40,7 +40,9 @@ class SmartPluginWebIf(): else: builtins.SDP_standalone = False -from lib.model.sdp.globals import JSON_MOVE_KEYS +from lib.model.sdp.globals import (JSON_MOVE_KEYS, PLUGIN_ATTR_CMD_CLASS, PLUGIN_ATTR_PROTOCOL, + PROTO_JSONRPC, PLUGIN_ATTR_CONNECTION, CONN_NET_TCP_CLI) + from lib.model.smartdeviceplugin import SmartDevicePlugin, Standalone # from .webif import WebInterface @@ -85,7 +87,12 @@ class kodi(SmartDevicePlugin): def _set_device_defaults(self): self._use_callbacks = True - self._parameters[JSON_MOVE_KEYS] = ['playerid', 'properties'] + self._parameters.update({ + JSON_MOVE_KEYS: ['playerid', 'properties'], + PLUGIN_ATTR_CONNECTION: CONN_NET_TCP_CLI, + PLUGIN_ATTR_PROTOCOL: PROTO_JSONRPC, + PLUGIN_ATTR_CMD_CLASS: 'SDPCommandJSON' + }) def _post_init(self): self._activeplayers = [] diff --git a/kodi/plugin.yaml b/kodi/plugin.yaml index 13266def9..af8eaa34f 100644 --- a/kodi/plugin.yaml +++ b/kodi/plugin.yaml @@ -102,7 +102,7 @@ parameters: de: Anzahl von Durchgängen vor Verbindungsabbruch oder Suspend-Modus en: number of connect rounds before giving up / entering suspend mode - message_timeout: + send_timeout: type: num default: 5 @@ -110,7 +110,7 @@ parameters: de: Timeout für Antwort auf Protokollebene en: timeout for reply at protocol level - message_repeat: + send_retries: type: num default: 3 @@ -126,39 +126,6 @@ parameters: de: Port für Netzwerkverbindung en: network port - conn_type: - type: str - default: net_tcp_client - valid_list: - - '' - - net_tcp_client - - description: - de: Verbindungstyp - en: connection type - - protocol: - type: str - default: jsonrpc - valid_list: - - '' - - jsonrpc - - description: - de: Protokolltyp für Verbindung - en: protocol type for connection - - command_class: - type: str - default: SDPCommandJSON - valid_list: - - SDPCommand - - SDPCommandJSON - - description: - de: Klasse für Verarbeitung von Kommandos - en: class for command processing - item_attributes: kodi_command: