Compare commits
11 Commits
a6af9d856b
...
782106e44a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
782106e44a | ||
|
|
0e0a8b853f | ||
|
|
8c716130a3 | ||
|
|
dfc9be33d7 | ||
|
|
9b592cf761 | ||
|
|
d3122416cf | ||
|
|
36b2891353 | ||
|
|
4fa6d7d643 | ||
|
|
90151c2958 | ||
|
|
4133c03759 | ||
|
|
aab694c302 |
15
release.yaml
15
release.yaml
@@ -1,19 +1,8 @@
|
||||
version: '0.9.0'
|
||||
version: '0.9.1'
|
||||
changelog: |-
|
||||
:tada: New features and improvements
|
||||
------------------------------------
|
||||
+ Add a page limit setting for tv shows (#393) @mcarlton00
|
||||
+ Add New Widgets (#381) @Aydanill
|
||||
+ Include track details in audio playback (#378) @davembg
|
||||
+ Add segment skip ability (#368) @Gorgorot38
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
+ Fix websocket reconnects (#396) @manuelschneider
|
||||
+ Ensure the filtered limit takes precedence over page limit (#395) @mcarlton00
|
||||
+ fix subtitle burn in (#384) @loztcf
|
||||
+ fix sdh/cc/hi subtitle for jellyfin > v10.9.0 (#385) @AndryYosua
|
||||
+ Fix bug with multiple external subtitles in the same languages (#369) @Gorgorot38
|
||||
+ Implement proper keepalives for websocket (#401) @mcarlton00
|
||||
dependencies:
|
||||
py2:
|
||||
- addon: 'xbmc.python'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2025-12-23 08:05+0000\n"
|
||||
"PO-Revision-Date: 2026-01-05 12:25+0000\n"
|
||||
"Last-Translator: rimasx <riks_12@hot.ee>\n"
|
||||
"Language-Team: Estonian <https://translate.jellyfin.org/projects/jellycon/"
|
||||
"jellycon/et/>\n"
|
||||
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.14\n"
|
||||
"X-Generator: Weblate 5.15.1\n"
|
||||
|
||||
msgctxt "#30021"
|
||||
msgid "Show all episodes item"
|
||||
@@ -73,7 +73,7 @@ msgstr "Port"
|
||||
|
||||
msgctxt "#30366"
|
||||
msgid "Manually enter user details"
|
||||
msgstr "Sisesta kasutaja andmed käsitsi"
|
||||
msgstr "Sisesta kasutajaandmed käsitsi"
|
||||
|
||||
msgctxt "#30241"
|
||||
msgid "Force transcode mpeg4"
|
||||
@@ -141,11 +141,11 @@ msgstr "- Albumi esitajad"
|
||||
|
||||
msgctxt "#30319"
|
||||
msgid "Music - All Album Artists"
|
||||
msgstr "Muusika – kõik albumi esitajad"
|
||||
msgstr "Muusika - Kõik albumi esitajad"
|
||||
|
||||
msgctxt "#30352"
|
||||
msgid "Music - Frequently Played"
|
||||
msgstr "Muusika – Sageli esitatud"
|
||||
msgstr "Muusika - Sageli esitatud"
|
||||
|
||||
msgctxt "#30327"
|
||||
msgid "Go To Season"
|
||||
@@ -161,11 +161,11 @@ msgstr "Episoodid - Viimati lisatud"
|
||||
|
||||
msgctxt "#30257"
|
||||
msgid "Movies - Recently Added"
|
||||
msgstr "Filmid – Viimati lisatud"
|
||||
msgstr "Filmid - Viimati lisatud"
|
||||
|
||||
msgctxt "#30349"
|
||||
msgid " - Recently Played"
|
||||
msgstr "- viimati esitatud"
|
||||
msgstr "- Viimati esitatud"
|
||||
|
||||
msgctxt "#30268"
|
||||
msgid " - Recently Added"
|
||||
@@ -173,11 +173,11 @@ msgstr "- Viimati lisatud"
|
||||
|
||||
msgctxt "#30351"
|
||||
msgid "Music - Recently Played"
|
||||
msgstr "Muusika – viimati esitatud"
|
||||
msgstr "Muusika - Viimati esitatud"
|
||||
|
||||
msgctxt "#30350"
|
||||
msgid "Music - Recently Added"
|
||||
msgstr "Muusika – Viimati lisatud"
|
||||
msgstr "Muusika - Viimati lisatud"
|
||||
|
||||
msgctxt "#30348"
|
||||
msgid "Add user ratings"
|
||||
@@ -245,7 +245,7 @@ msgstr "Filme lehel"
|
||||
|
||||
msgctxt "#30330"
|
||||
msgid "Show change user dialog"
|
||||
msgstr "Kuva kasutaja vahetamise dialoog"
|
||||
msgstr "Kuva kasutaja vahetamise aken"
|
||||
|
||||
msgctxt "#30329"
|
||||
msgid "Screensaver"
|
||||
@@ -269,7 +269,7 @@ msgstr "- Albumid"
|
||||
|
||||
msgctxt "#30318"
|
||||
msgid "Music - Albums"
|
||||
msgstr "Muusika – Albumid"
|
||||
msgstr "Muusika - Albumid"
|
||||
|
||||
msgctxt "#30317"
|
||||
msgid "Play All"
|
||||
@@ -281,7 +281,7 @@ msgstr "Ühenduse viga"
|
||||
|
||||
msgctxt "#30315"
|
||||
msgid "Suppress notifications for connection errors"
|
||||
msgstr "Lülita ühenduse veateavitused välja"
|
||||
msgstr "Peida ühenduse veateavitused"
|
||||
|
||||
msgctxt "#30314"
|
||||
msgid "Play"
|
||||
@@ -305,7 +305,7 @@ msgstr "Luba Jellyfini kaugjuhtimine"
|
||||
|
||||
msgctxt "#30309"
|
||||
msgid "Select Media Source"
|
||||
msgstr "Vali meedia allikas"
|
||||
msgstr "Vali meediaallikas"
|
||||
|
||||
msgctxt "#30308"
|
||||
msgid "Select Trailer"
|
||||
@@ -417,7 +417,7 @@ msgstr "Värskenda puhverdatud pilte"
|
||||
|
||||
msgctxt "#30280"
|
||||
msgid "Missing Title"
|
||||
msgstr "Puuduv pealkiri"
|
||||
msgstr "Puuduv nimetus"
|
||||
|
||||
msgctxt "#30279"
|
||||
msgid "TV Shows - Unwatched"
|
||||
@@ -431,7 +431,7 @@ msgctxt "#30277"
|
||||
msgid "JellyCon needs to prompt for resume on partily played items, Kodi can also prompt, this can cause a double prompt. Do you want to remove the double prompt?"
|
||||
msgstr ""
|
||||
"JellyCon peab küsima jätkamist osaliselt esitatud üksuste puhul. Kodi võib "
|
||||
"samuti küsida ja see võib põhjustada päringu. Kas soovid topeltpäringu "
|
||||
"samuti küsida ja see võib põhjustada topeltpäringu. Kas soovid topeltpäringu "
|
||||
"eemaldada?"
|
||||
|
||||
msgctxt "#30276"
|
||||
@@ -460,7 +460,7 @@ msgstr "Märgi vaadatuks"
|
||||
|
||||
msgctxt "#30269"
|
||||
msgid "Movies - Random"
|
||||
msgstr "Filmid – Juhuslikud"
|
||||
msgstr "Filmid - Juhuslikud"
|
||||
|
||||
msgctxt "#30267"
|
||||
msgid " - In Progress"
|
||||
@@ -468,7 +468,7 @@ msgstr "- Pooleli"
|
||||
|
||||
msgctxt "#30266"
|
||||
msgid "Movies - Pages"
|
||||
msgstr "Filmid – Lehed"
|
||||
msgstr "Filmid - Lehed"
|
||||
|
||||
msgctxt "#30265"
|
||||
msgid "Episodes - Next Up"
|
||||
@@ -492,11 +492,11 @@ msgstr "Kogumikud"
|
||||
|
||||
msgctxt "#30259"
|
||||
msgid "Movies - Favorites"
|
||||
msgstr "Filmid – Lemmikud"
|
||||
msgstr "Filmid - Lemmikud"
|
||||
|
||||
msgctxt "#30258"
|
||||
msgid "Movies - In Progress"
|
||||
msgstr "Filmid – Pooleli"
|
||||
msgstr "Filmid - Pooleli"
|
||||
|
||||
msgctxt "#30256"
|
||||
msgid "Movies"
|
||||
@@ -508,7 +508,7 @@ msgstr "Sarjad - A-Ü"
|
||||
|
||||
msgctxt "#30254"
|
||||
msgid "Show add-on settings"
|
||||
msgstr "Kuva lisamooduli seaded"
|
||||
msgstr "Lisamooduli seaded"
|
||||
|
||||
msgctxt "#30252"
|
||||
msgid "Movies - A-Z"
|
||||
@@ -516,7 +516,7 @@ msgstr "Filmid - A-Ü"
|
||||
|
||||
msgctxt "#30251"
|
||||
msgid "Movies - Genres"
|
||||
msgstr "Filmid – Žanrid"
|
||||
msgstr "Filmid - Žanrid"
|
||||
|
||||
msgctxt "#30250"
|
||||
msgid "Unknown"
|
||||
@@ -604,7 +604,7 @@ msgstr "HTTP otsevoog"
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Host"
|
||||
msgstr "Serveri aadress"
|
||||
msgstr "Server"
|
||||
|
||||
msgctxt "#30182"
|
||||
msgid "Include media stream info"
|
||||
@@ -676,7 +676,7 @@ msgstr "Tehtud"
|
||||
|
||||
msgctxt "#30121"
|
||||
msgid "On resume"
|
||||
msgstr "Jätkamisel"
|
||||
msgstr "Taasesituse jätkamisel"
|
||||
|
||||
msgctxt "#30120"
|
||||
msgid "Show load progress"
|
||||
@@ -684,7 +684,7 @@ msgstr "Kuva laadimise edenemine"
|
||||
|
||||
msgctxt "#30116"
|
||||
msgid "Add unwatched counts to names"
|
||||
msgstr "Lisa nimedele vaatamata arv"
|
||||
msgstr "Lisa nimedele vaatamata episoodide arv"
|
||||
|
||||
msgctxt "#30118"
|
||||
msgid "Add resume percent to names"
|
||||
@@ -716,7 +716,7 @@ msgstr "Hoiatus: see toiming kustutab meediafailid serverist."
|
||||
|
||||
msgctxt "#30091"
|
||||
msgid "Confirm delete?"
|
||||
msgstr "Kas kinnitada kustutamine?"
|
||||
msgstr "Kas kustutamine kinnitada?"
|
||||
|
||||
msgctxt "#30063"
|
||||
msgid "N/A"
|
||||
@@ -744,7 +744,7 @@ msgstr "Luba silumislogimine"
|
||||
|
||||
msgctxt "#30026"
|
||||
msgid "Widget item select action"
|
||||
msgstr "Vidina toiming üksuse valikul"
|
||||
msgstr "Toiming vidina elemendi valimisel"
|
||||
|
||||
msgctxt "#30025"
|
||||
msgid "Password:"
|
||||
@@ -768,7 +768,7 @@ msgstr "Filtreeritud episoodi nime vorming"
|
||||
|
||||
msgctxt "#30213"
|
||||
msgid "Video force 8 bit"
|
||||
msgstr "Sunni 8 bit video"
|
||||
msgstr "Sunni 8 bitine video"
|
||||
|
||||
msgctxt "#30368"
|
||||
msgid "Clear Password?"
|
||||
@@ -780,7 +780,7 @@ msgstr "Kohalike serverite skaneerimine"
|
||||
|
||||
msgctxt "#30376"
|
||||
msgid "Checking server url"
|
||||
msgstr "Serveri URL-i kontrollimine"
|
||||
msgstr "Serveri URL-i kontroll"
|
||||
|
||||
msgctxt "#30323"
|
||||
msgid "Artists"
|
||||
@@ -824,7 +824,7 @@ msgstr "Süsteem -"
|
||||
|
||||
msgctxt "#30225"
|
||||
msgid "Interface Mode"
|
||||
msgstr "Kasutajaliidese režiim"
|
||||
msgstr "Kasutajaliidese olek"
|
||||
|
||||
msgctxt "#30226"
|
||||
msgid "Default"
|
||||
@@ -856,7 +856,7 @@ msgstr "Päringu saatmine"
|
||||
|
||||
msgctxt "#30375"
|
||||
msgid "Receiving data packet"
|
||||
msgstr "Andmepaketi vastuvõtmine"
|
||||
msgstr "Andmepaketi vastuvõtt"
|
||||
|
||||
msgctxt "#30378"
|
||||
msgid "Persist user details"
|
||||
@@ -864,7 +864,7 @@ msgstr "Säilita kasutajaandmed"
|
||||
|
||||
msgctxt "#30379"
|
||||
msgid "External subtitle prompt"
|
||||
msgstr "Väliste subtiitrite pakkumine"
|
||||
msgstr "Paku väliseid subtiitreid"
|
||||
|
||||
msgctxt "#30439"
|
||||
msgid "Show play next episode at time left in seconds"
|
||||
@@ -1152,7 +1152,7 @@ msgstr "Kordusvaatamise päevad (0 = keelatud)"
|
||||
|
||||
msgctxt "#30453"
|
||||
msgid "Hide number of items to show on entry title"
|
||||
msgstr "Peida pealkirjas kuvatavate üksuste arv"
|
||||
msgstr "Peida kuvatavate üksuste arv avalehel"
|
||||
|
||||
msgctxt "#30455"
|
||||
msgid "TV Shows - Random"
|
||||
@@ -1173,3 +1173,51 @@ msgstr "Kõik - Lemmikud"
|
||||
msgctxt "#30678"
|
||||
msgid "TV Shows per page"
|
||||
msgstr "Sarjade arv lehel"
|
||||
|
||||
msgctxt "#30020"
|
||||
msgid "Flatten single season"
|
||||
msgstr "Ära kuva üksikut hooaega"
|
||||
|
||||
msgctxt "#30224"
|
||||
msgid "Interaction"
|
||||
msgstr "Interaktsioon"
|
||||
|
||||
msgctxt "#30430"
|
||||
msgid "Label"
|
||||
msgstr "Silt"
|
||||
|
||||
msgctxt "#30438"
|
||||
msgid "Play cinema intros"
|
||||
msgstr "Esita filmi intro"
|
||||
|
||||
msgctxt "#30666"
|
||||
msgid "Segment Skipper"
|
||||
msgstr "Segmendi vahelejätja"
|
||||
|
||||
msgctxt "#30670"
|
||||
msgid "Intro Skipper"
|
||||
msgstr "Sissejuhatuse vahelejätja"
|
||||
|
||||
msgctxt "#30671"
|
||||
msgid "Credit Skipper"
|
||||
msgstr "Lõputiitrite vahelejätja"
|
||||
|
||||
msgctxt "#30675"
|
||||
msgid "Commercial Skipper"
|
||||
msgstr "Reklaamide vahelejätja"
|
||||
|
||||
msgctxt "#30676"
|
||||
msgid "Preview Skipper"
|
||||
msgstr "Eelvaatuse vahelejätja"
|
||||
|
||||
msgctxt "#30677"
|
||||
msgid "Recap Skipper"
|
||||
msgstr "Kokkuvõtte vahelejätja"
|
||||
|
||||
msgctxt "#30421"
|
||||
msgid "Views"
|
||||
msgstr "Vaated"
|
||||
|
||||
msgctxt "#30450"
|
||||
msgid "Next Up Rewatching"
|
||||
msgstr "Järgmisena kordusvaatamisel"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2025-07-21 20:37+0000\n"
|
||||
"Last-Translator: czlevi7 <czlevi7@gmail.com>\n"
|
||||
"PO-Revision-Date: 2026-01-04 21:05+0000\n"
|
||||
"Last-Translator: Levente Suli <suli.levente.07@icloud.com>\n"
|
||||
"Language-Team: Hungarian <https://translate.jellyfin.org/projects/jellycon/"
|
||||
"jellycon/hu/>\n"
|
||||
"Language: hu\n"
|
||||
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.11.4\n"
|
||||
"X-Generator: Weblate 5.15.1\n"
|
||||
|
||||
msgctxt "#30441"
|
||||
msgid "Use cached widget data"
|
||||
@@ -1086,7 +1086,7 @@ msgstr "Port"
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Host"
|
||||
msgstr "Gazda"
|
||||
msgstr "Gazdagép"
|
||||
|
||||
msgctxt "#30444"
|
||||
msgid "Login using Quick Connect"
|
||||
@@ -1207,3 +1207,23 @@ msgstr "Kérdezz"
|
||||
msgctxt "#30677"
|
||||
msgid "Recap Skipper"
|
||||
msgstr "Összefoglaló átugró"
|
||||
|
||||
msgctxt "#30455"
|
||||
msgid "TV Shows - Random"
|
||||
msgstr "TV Műsorok - Véletlenszerű"
|
||||
|
||||
msgctxt "#30456"
|
||||
msgid "All - Random"
|
||||
msgstr "Összes - Véletlenszerű"
|
||||
|
||||
msgctxt "#30457"
|
||||
msgid "All - Recently Added"
|
||||
msgstr "Összes - Nemrég hozzáadott"
|
||||
|
||||
msgctxt "#30458"
|
||||
msgid "All - Favorites"
|
||||
msgstr "Összes - Kedvencek"
|
||||
|
||||
msgctxt "#30678"
|
||||
msgid "TV Shows per page"
|
||||
msgstr "TV Műsorok oldalanként"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2025-06-28 11:51+0000\n"
|
||||
"Last-Translator: Nirwan <ny.unpar@gmail.com>\n"
|
||||
"PO-Revision-Date: 2026-01-05 12:25+0000\n"
|
||||
"Last-Translator: daryhanif <daryhanif00@gmail.com>\n"
|
||||
"Language-Team: Indonesian <https://translate.jellyfin.org/projects/jellycon/"
|
||||
"jellycon/id/>\n"
|
||||
"Language: id\n"
|
||||
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 5.11.4\n"
|
||||
"X-Generator: Weblate 5.15.1\n"
|
||||
|
||||
msgctxt "#30414"
|
||||
msgid " - Favorites"
|
||||
@@ -1206,3 +1206,8 @@ msgstr "Lewatkan"
|
||||
msgctxt "#30677"
|
||||
msgid "Recap Skipper"
|
||||
msgstr "Lewati Rekap"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "#30457"
|
||||
msgid "All - Recently Added"
|
||||
msgstr "Semua - Baru-Baru ini ditambahkan"
|
||||
|
||||
@@ -33,11 +33,11 @@ class WebSocketClient(threading.Thread):
|
||||
|
||||
self.__dict__ = self._shared_state
|
||||
self.monitor = xbmc.Monitor()
|
||||
self.retry_count = 0
|
||||
|
||||
self.device_id = get_device_id()
|
||||
|
||||
self._library_monitor = library_change_monitor
|
||||
self.websocket_error = False
|
||||
|
||||
threading.Thread.__init__(self)
|
||||
|
||||
@@ -46,12 +46,7 @@ class WebSocketClient(threading.Thread):
|
||||
result = json.loads(message)
|
||||
message_type = result['MessageType']
|
||||
|
||||
if message_type == 'ForceKeepAlive':
|
||||
timeout_seconds = result.get('Data', 60)
|
||||
log.debug("Received ForceKeepAlive with timeout: {0}s".format(timeout_seconds))
|
||||
self._send_keep_alive()
|
||||
|
||||
elif message_type == 'Play':
|
||||
if message_type == 'Play':
|
||||
data = result['Data']
|
||||
self._play(data)
|
||||
|
||||
@@ -235,16 +230,18 @@ class WebSocketClient(threading.Thread):
|
||||
xbmc.executebuiltin(builtin[command])
|
||||
|
||||
def on_open(self, ws):
|
||||
# Wait to make sure previous keepalive cycle has ended
|
||||
if self.websocket_error:
|
||||
time.sleep(30)
|
||||
self.websocket_error = False
|
||||
log.debug("Connected")
|
||||
self.retry_count = 0
|
||||
self.post_capabilities()
|
||||
self.send_keepalive(ws)
|
||||
|
||||
def on_error(self, ws, error):
|
||||
self.websocket_error = True
|
||||
log.debug("Error: {0}".format(error))
|
||||
|
||||
def on_close(self, ws, close_status_code, close_msg):
|
||||
log.debug("WebSocket closed. Code: {0}, Message: {1}".format(close_status_code, close_msg))
|
||||
|
||||
def run(self):
|
||||
|
||||
token = None
|
||||
@@ -267,23 +264,17 @@ class WebSocketClient(threading.Thread):
|
||||
)
|
||||
log.debug("websocket url: {0}".format(websocket_url))
|
||||
|
||||
self._client = websocket.WebSocketApp(
|
||||
websocket_url,
|
||||
on_open=lambda ws: self.on_open(ws),
|
||||
on_message=lambda ws, message: self.on_message(ws, message),
|
||||
on_error=lambda ws, error: self.on_error(ws, error))
|
||||
|
||||
log.debug("Starting WebSocketClient")
|
||||
|
||||
while not self.monitor.abortRequested():
|
||||
|
||||
# Create a new WebSocketApp for each connection attempt to avoid
|
||||
# memory leaks from reusing a potentially dirty connection object
|
||||
self._client = websocket.WebSocketApp(
|
||||
websocket_url,
|
||||
on_open=lambda ws: self.on_open(ws),
|
||||
on_message=lambda ws, message: self.on_message(ws, message),
|
||||
on_error=lambda ws, error: self.on_error(ws, error),
|
||||
on_close=lambda ws, status, msg: self.on_close(ws, status, msg))
|
||||
|
||||
# Use ping_interval without ping_timeout to keep connection alive
|
||||
# without forcing disconnection. The server's ForceKeepAlive/KeepAlive
|
||||
# mechanism handles the actual keepalive logic.
|
||||
self._client.run_forever(ping_interval=10)
|
||||
self._client.run_forever(reconnect=30)
|
||||
|
||||
if self._stop_websocket:
|
||||
break
|
||||
@@ -292,8 +283,6 @@ class WebSocketClient(threading.Thread):
|
||||
# Abort was requested, exit
|
||||
break
|
||||
|
||||
if self.retry_count < 12:
|
||||
self.retry_count += 1
|
||||
log.debug("Reconnecting WebSocket")
|
||||
|
||||
log.debug("WebSocketClient Stopped")
|
||||
@@ -305,17 +294,6 @@ class WebSocketClient(threading.Thread):
|
||||
self._client.close()
|
||||
log.debug("Stopping WebSocket (stop_client called)")
|
||||
|
||||
def _send_keep_alive(self):
|
||||
"""Send a KeepAlive message to the server to maintain the connection."""
|
||||
try:
|
||||
keep_alive_message = json.dumps({
|
||||
'MessageType': 'KeepAlive'
|
||||
})
|
||||
self._client.send(keep_alive_message)
|
||||
log.debug("Sent KeepAlive message")
|
||||
except Exception as error:
|
||||
log.debug("Error sending KeepAlive: {0}".format(error))
|
||||
|
||||
def post_capabilities(self):
|
||||
|
||||
settings = xbmcaddon.Addon()
|
||||
@@ -328,3 +306,22 @@ class WebSocketClient(threading.Thread):
|
||||
)
|
||||
|
||||
api.post_capabilities()
|
||||
|
||||
def send_keepalive(self, ws):
|
||||
# Stop the keepalive cycle if an error has been detected
|
||||
if self.websocket_error:
|
||||
return
|
||||
keepalive_payload = json.dumps({"MessageType": "KeepAlive", "Data": 30})
|
||||
# Send the keepalive, or register an error
|
||||
try:
|
||||
ws.send(keepalive_payload)
|
||||
except:
|
||||
self.websocket_error = True
|
||||
return
|
||||
# Schedule the next message
|
||||
self.schedule_keepalive(ws)
|
||||
|
||||
def schedule_keepalive(self, ws):
|
||||
# Schedule a keepalive message in 30 seconds
|
||||
timer = threading.Timer(30, self.send_keepalive, kwargs={'ws': ws})
|
||||
timer.start()
|
||||
|
||||
Reference in New Issue
Block a user