Skip to content

Commit

Permalink
Merge pull request #959 from Morg42/develop
Browse files Browse the repository at this point in the history
kodi: adjust to latest sdp changes, cleanup plugin.yaml
  • Loading branch information
Morg42 authored Aug 23, 2024
2 parents 5109b39 + aca09b3 commit e957be1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 37 deletions.
11 changes: 9 additions & 2 deletions kodi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = []
Expand Down
37 changes: 2 additions & 35 deletions kodi/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ 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

description:
de: Timeout für Antwort auf Protokollebene
en: timeout for reply at protocol level

message_repeat:
send_retries:
type: num
default: 3

Expand All @@ -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:
Expand Down

0 comments on commit e957be1

Please sign in to comment.