New setting to change Plex Companion update port

- Fixes #173
This commit is contained in:
tomkat83 2017-01-24 10:16:32 +01:00
parent bb7bd53133
commit 5046f856ca
4 changed files with 9 additions and 5 deletions

View file

@ -363,7 +363,7 @@
<string id="39001">Boost audio when transcoding</string>
<string id="39002">Burnt-in subtitle size</string>
<string id="39003">Limit download sync threads (rec. for rpi: 1)</string>
<string id="39004">Enable Plex Companion</string>
<string id="39004">Enable Plex Companion (restart Kodi!)</string>
<string id="39005">Plex Companion Port (change only if needed)</string>
<string id="39006">Activate Plex Companion debug log</string>
<string id="39007">Activate Plex Companion GDM debug log</string>
@ -438,6 +438,7 @@
<string id="39075">Always use default Plex subtitle if possible</string>
<string id="39076">If you use several Plex libraries of one kind, e.g. "Kids Movies" and "Parents Movies", be sure to check the Wiki: https://goo.gl/JFtQV9</string>
<string id="39077">Number of PMS items to show in widgets (e.g. "On Deck")</string>
<string id="39078">Plex Companion Update Port (change only if needed)</string>
<!-- Plex Entrypoint.py -->
<string id="39200">Log-out Plex Home User </string>

View file

@ -312,7 +312,7 @@
<string id="39001">Audio Verstärkung (audio boost) wenn transkodiert wird</string>
<string id="39002">Grösse des Untertitels, falls burnt-in</string>
<string id="39003">Download Sync Threads beschränken (Empfehlung RPI: 1)</string>
<string id="39004">Plex Companion aktivieren</string>
<string id="39004">Plex Companion aktivieren (Kodi neu starten!)</string>
<string id="39005">Plex Companion Port (nur bei Bedarf ändern)</string>
<string id="39006">Plex Companion debug log aktivieren</string>
<string id="39007">Plex Companion GDM debug log aktivieren</string>
@ -387,6 +387,7 @@
<string id="39075">Falls möglich, Plex Standard-Untertitel anzeigen</string>
<string id="39076">Falls du mehrere Plex Bibliotheken einer Art nutzt, z.B. "Filme Kinder" und "Filme Eltern", lies unbedingt das Wiki unter https://goo.gl/JFtQV9</string>
<string id="39077">Anzahl anzuzeigender PMS Einträge in Widgets (z.B. "Aktuell")</string>
<string id="39078">Plex Companion Update Port (nur bei Bedarf ändern)</string>
<!-- Plex Entrypoint.py -->
<string id="39200">Plex Home Benutzer abmelden: </string>

View file

@ -49,7 +49,7 @@ class plexgdm:
self._multicast_address = '239.0.0.250'
self.discover_group = (self._multicast_address, 32414)
self.client_register_group = (self._multicast_address, 32413)
self.client_update_port = 32412
self.client_update_port = int(settings('companionUpdatePort'))
self.server_list = []
self.discovery_interval = 120
@ -104,8 +104,9 @@ class plexgdm:
try:
update_sock.bind(('0.0.0.0', self.client_update_port))
except:
log.error("Unable to bind to port [%s] - client will not be "
"registered" % self.client_update_port)
log.error("Unable to bind to port [%s] - Plex Companion will not "
"be registered. Change the Plex Companion update port!"
% self.client_update_port)
return
update_sock.setsockopt(socket.IPPROTO_IP,

View file

@ -39,6 +39,7 @@
<setting id="deviceNameOpt" label="30504" type="bool" default="false" subsetting="true" visible="eq(-1,true)" />
<setting id="deviceName" label="30016" type="text" visible="eq(-1,true)" default="Kodi" subsetting="true" />
<setting id="companionPort" label="39005" type="number" default="3005" option="int" visible="eq(-3,true)" subsetting="true" />
<setting id="companionUpdatePort" label="39078" type="number" default="32412" option="int" visible="eq(-4,true)" subsetting="true" />
<setting id="plex_restricteduser" type="bool" default="false" visible="false"/>
<setting id="plex_allows_mediaDeletion" type="bool" default="true" visible="false"/>