diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae7e068a..5b2c3be1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,14 @@ Thanks a ton for contributing to PlexKodiConnect! + +## Programming + * Please make pull requests towards the **develop** branch, not the master branch. Hence please fork the **develop** branch and not the master branch * Thanks if you can follow the Python style guide [PEP8](https://www.python.org/dev/peps/pep-0008/) to keep things neat and clean * Thanks if you add some comments to make your code more readable ;-) + + +## Translations + +* Please [only use crowdin.com](https://crowdin.com/project/plexkodiconnect/invite) to help with translations. Don't use Github pull requests. \ No newline at end of file diff --git a/README.md b/README.md index e8903313..80780efa 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,9 @@ PKC currently provides the following features: - Different PKC interface languages: + English + German - + Czech (thanks @Pavuucek) - + More coming up + + Czech, thanks @Pavuucek + + Spanish, thanks @bartolomesoriano + + More coming up: [you can help!](https://crowdin.com/project/plexkodiconnect/invite) - [Plex Watch Later / Plex It!](https://support.plex.tv/hc/en-us/sections/200211783-Plex-It-) - [Plex Companion](https://support.plex.tv/hc/en-us/sections/200276908-Plex-Companion): fling Plex media (or anything else) from other Plex devices to PlexKodiConnect - [Plex Transcoding](https://support.plex.tv/hc/en-us/articles/200250377-Transcoding-Media) diff --git a/addon.xml b/addon.xml index 48d3c8be..091d024d 100644 --- a/addon.xml +++ b/addon.xml @@ -21,19 +21,19 @@ + Native Integration of Plex into Kodi + Úplná integrace Plexu do Kodi + Komplette Integration von Plex in Kodi + Native Integration of Plex into Kodi + Connect Kodi to your Plex Media Server. This plugin assumes that you manage all your videos with Plex (and none with Kodi). You might lose data already stored in the Kodi video and music databases (as this plugin directly changes them). Use at your own risk! + Připojte Kodi ke svému Plex Media Serveru. Tento doplněk předpokládá, že spravujete veškerá svá videa pomocí Plexu (nikoliv pomocí Kodi). Můžete přijít o data uložená ve video a hudební databázi Kodi (tento doplněk je přímo mění). Používejte na vlastní nebezpečí! + Verbindet Kodi mit deinem Plex Media Server. Dieses Addon geht davon aus, dass du all deine Videos mit Plex verwaltest (und keine direkt mit Kodi). Du wirst möglicherweise Daten verlieren, die bereits in der Kodi Video- und/oder Musik-Datenbank gespeichert sind (da dieses Addon beide Datenbanken direkt verändert). Verwende auf eigene Gefahr! + Connect Kodi to your Plex Media Server. This plugin assumes that you manage all your videos with Plex (and none with Kodi). You might lose data already stored in the Kodi video and music databases (as this plugin directly changes them). Use at your own risk! all - en cs de es - GNU GENERAL PUBLIC LICENSE. Version 2, June 1991 + GPL v2.0 https://forums.plex.tv https://github.com/croneter/PlexKodiConnect + https://github.com/croneter/PlexKodiConnect - Native Integration of Plex into Kodi - Connect Kodi to your Plex Media Server. This plugin assumes that you manage all your videos with Plex (and none with Kodi). You might lose data already stored in the Kodi video and music databases (as this plugin directly changes them). Use at your own risk! - Úplná integrace Plexu do Kodi - Připojte Kodi ke svému Plex Media Serveru. Tento doplněk předpokládá, že spravujete veškerá svá videa pomocí Plexu (nikoliv pomocí Kodi). Můžete přijít o data uložená ve video a hudební databázi Kodi (tento doplněk je přímo mění). Používejte na vlastní nebezpečí! - Komplette Integration von Plex in Kodi - Verbindet Kodi mit deinem Plex Media Server. Dieses Addon geht davon aus, dass du all deine Videos mit Plex verwaltest (und keine direkt mit Kodi). Du wirst möglicherweise Daten verlieren, die bereits in der Kodi Video- und/oder Musik-Datenbank gespeichert sind (da dieses Addon beide Datenbanken direkt verändert). Verwende auf eigene Gefahr! - Native Integration of Plex into Kodi - Connect Kodi to your Plex Media Server. This plugin assumes that you manage all your videos with Plex (and none with Kodi). You might lose data already stored in the Kodi video and music databases (as this plugin directly changes them). Use at your own risk! \ No newline at end of file diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index d1e26558..6a62f5be 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -474,9 +474,18 @@ class PlexAPI(): if PMS['uuid'] in self.g_PMS: log.debug('We already know of PMS %s from plex.tv' % PMS['serverName']) - continue - self.declarePMS(PMS['uuid'], PMS['serverName'], 'http', - PMS['ip'], PMS['port']) + # Update with GDM data - potentially more reliable than plex.tv + self.updatePMSProperty(PMS['uuid'], 'ip', PMS['ip']) + self.updatePMSProperty(PMS['uuid'], 'port', PMS['port']) + self.updatePMSProperty(PMS['uuid'], 'local', '1') + self.updatePMSProperty(PMS['uuid'], 'scheme', 'http') + self.updatePMSProperty(PMS['uuid'], + 'baseURL', + 'http://%s:%s' % (PMS['ip'], + PMS['port'])) + else: + self.declarePMS(PMS['uuid'], PMS['serverName'], 'http', + PMS['ip'], PMS['port']) # Ping to check whether we need HTTPs or HTTP https = PMSHttpsEnabled('%s:%s' % (PMS['ip'], PMS['port'])) if https is None: diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 279f679f..6c95b56d 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -605,6 +605,7 @@ class LibrarySync(Thread): except Exception as e: # Empty movies, tv shows? log.error('Path hack failed with error message: %s' % str(e)) + setScreensaver(value=screensaver) return True def processView(self, folderItem, kodi_db, plex_db, totalnodes): diff --git a/resources/lib/utils.py b/resources/lib/utils.py index e7931e32..34b34c1e 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -278,33 +278,15 @@ def create_actor_db_index(): def getScreensaver(): # Get the current screensaver value - query = { + params = {'setting': "screensaver.mode"} + return JSONRPC('Settings.getSettingValue').execute(params)['result']['value'] - 'jsonrpc': "2.0", - 'id': 0, - 'method': "Settings.getSettingValue", - 'params': { - - 'setting': "screensaver.mode" - } - } - return loads(xbmc.executeJSONRPC(dumps(query)))['result']['value'] def setScreensaver(value): # Toggle the screensaver - query = { - - 'jsonrpc': "2.0", - 'id': 0, - 'method': "Settings.setSettingValue", - 'params': { - - 'setting': "screensaver.mode", - 'value': value - } - } - log.debug("Toggling screensaver: %s %s" - % (value, xbmc.executeJSONRPC(dumps(query)))) + params = {'setting': "screensaver.mode", 'value': value} + log.debug('Toggling screensaver to "%s": %s' + % (value, JSONRPC('Settings.setSettingValue').execute(params))) def reset(): diff --git a/service.py b/service.py index 13057a2c..02b658ad 100644 --- a/service.py +++ b/service.py @@ -4,7 +4,7 @@ import logging from os import path as os_path -from sys import path as sys_path +from sys import path as sys_path, argv from xbmc import translatePath, Monitor, sleep from xbmcaddon import Addon @@ -100,6 +100,7 @@ class Service(): log.warn("Number of sync threads: %s" % settings('syncThreadNumber')) log.warn("Log Level: %s" % logLevel) + log.warn("Full sys.argv received: %s" % argv) # Reset window props for profile switch properties = [