mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Add setting to disable remote control
This commit is contained in:
parent
c3136752dd
commit
1fcc0d97e3
4 changed files with 27 additions and 16 deletions
|
@ -9,7 +9,7 @@ import time
|
||||||
|
|
||||||
from kodi_six import xbmc
|
from kodi_six import xbmc
|
||||||
|
|
||||||
from ..helper import LazyLogger
|
from ..helper import LazyLogger, settings
|
||||||
|
|
||||||
# If numpy is installed, the websockets library tries to use it, and then
|
# If numpy is installed, the websockets library tries to use it, and then
|
||||||
# kodi hard crashes for reasons I don't even want to pretend to understand
|
# kodi hard crashes for reasons I don't even want to pretend to understand
|
||||||
|
@ -79,21 +79,23 @@ class WSClient(threading.Thread):
|
||||||
|
|
||||||
def on_open(self, ws):
|
def on_open(self, ws):
|
||||||
LOG.info("--->[ websocket ]")
|
LOG.info("--->[ websocket ]")
|
||||||
self.client.jellyfin.post_capabilities({
|
if settings('remoteControl.bool'):
|
||||||
'PlayableMediaTypes': "Audio,Video",
|
self.client.jellyfin.post_capabilities({
|
||||||
'SupportsMediaControl': True,
|
'PlayableMediaTypes': "Audio,Video",
|
||||||
'SupportedCommands': (
|
'SupportsMediaControl': True,
|
||||||
"MoveUp,MoveDown,MoveLeft,MoveRight,Select,"
|
'SupportedCommands': (
|
||||||
"Back,ToggleContextMenu,ToggleFullscreen,ToggleOsdMenu,"
|
"MoveUp,MoveDown,MoveLeft,MoveRight,Select,"
|
||||||
"GoHome,PageUp,NextLetter,GoToSearch,"
|
"Back,ToggleContextMenu,ToggleFullscreen,ToggleOsdMenu,"
|
||||||
"GoToSettings,PageDown,PreviousLetter,TakeScreenshot,"
|
"GoHome,PageUp,NextLetter,GoToSearch,"
|
||||||
"VolumeUp,VolumeDown,ToggleMute,SendString,DisplayMessage,"
|
"GoToSettings,PageDown,PreviousLetter,TakeScreenshot,"
|
||||||
"SetAudioStreamIndex,SetSubtitleStreamIndex,"
|
"VolumeUp,VolumeDown,ToggleMute,SendString,DisplayMessage,"
|
||||||
"SetRepeatMode,"
|
"SetAudioStreamIndex,SetSubtitleStreamIndex,"
|
||||||
"Mute,Unmute,SetVolume,"
|
"SetRepeatMode,Mute,Unmute,SetVolume,"
|
||||||
"Play,Playstate,PlayNext,PlayMediaSource"
|
"Play,Playstate,PlayNext,PlayMediaSource"
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
else:
|
||||||
|
self.client.jellyfin.post_capabilities({})
|
||||||
# Reinitialize the retry counter after successful connection
|
# Reinitialize the retry counter after successful connection
|
||||||
self.retry_count = 0
|
self.retry_count = 0
|
||||||
|
|
||||||
|
|
|
@ -689,6 +689,10 @@ msgctxt "#33124"
|
||||||
msgid "Include people (slow)"
|
msgid "Include people (slow)"
|
||||||
msgstr "Include people (slow)"
|
msgstr "Include people (slow)"
|
||||||
|
|
||||||
|
msgctxt "#33125"
|
||||||
|
msgid "Enable remote control"
|
||||||
|
msgstr "Enable remote control"
|
||||||
|
|
||||||
msgctxt "#33128"
|
msgctxt "#33128"
|
||||||
msgid "Failed to retrieve latest content updates. No content updates will be applied until Kodi is restarted. If this issue persists, please report on the Jellyfin for Kodi forums, with your Kodi log."
|
msgid "Failed to retrieve latest content updates. No content updates will be applied until Kodi is restarted. If this issue persists, please report on the Jellyfin for Kodi forums, with your Kodi log."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -653,6 +653,10 @@ msgctxt "#33124"
|
||||||
msgid "Include people (slow)"
|
msgid "Include people (slow)"
|
||||||
msgstr "Include people (slow)"
|
msgstr "Include people (slow)"
|
||||||
|
|
||||||
|
msgctxt "#33125"
|
||||||
|
msgid "Enable remote control"
|
||||||
|
msgstr "Enable remote control"
|
||||||
|
|
||||||
msgctxt "#33128"
|
msgctxt "#33128"
|
||||||
msgid "Failed to retrieve latest content updates. No content updates will be applied until Kodi is restarted. If this issue persists, please report on the Jellyfin for Kodi forums, with your Kodi log."
|
msgid "Failed to retrieve latest content updates. No content updates will be applied until Kodi is restarted. If this issue persists, please report on the Jellyfin for Kodi forums, with your Kodi log."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -92,6 +92,7 @@
|
||||||
<category label="33109"><!-- Plugin -->
|
<category label="33109"><!-- Plugin -->
|
||||||
<setting id="ignoreSpecialsNextEpisodes" type="bool" label="30527" default="false" />
|
<setting id="ignoreSpecialsNextEpisodes" type="bool" label="30527" default="false" />
|
||||||
<setting id="getCast" type="bool" label="33124" default="false" />
|
<setting id="getCast" type="bool" label="33124" default="false" />
|
||||||
|
<setting id="remoteControl" type="bool" label="33124" default="true" />
|
||||||
</category>
|
</category>
|
||||||
|
|
||||||
<category label="30022"><!-- Advanced -->
|
<category label="30022"><!-- Advanced -->
|
||||||
|
|
Loading…
Reference in a new issue