From d0ba66ecb8bf5c9a5fdc0ce1e6c58fc7f874baf7 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 9 Mar 2017 16:45:22 +0100 Subject: [PATCH 01/66] Update translations --- resources/language/Czech/addon.xml | 33 -------------------------- resources/language/Czech/strings.xml | 4 ++++ resources/language/English/addon.xml | 33 -------------------------- resources/language/German/addon.xml | 33 -------------------------- resources/language/German/strings.xml | 1 + resources/language/Spanish/addon.xml | 33 -------------------------- resources/language/Spanish/strings.xml | 4 ++++ 7 files changed, 9 insertions(+), 132 deletions(-) delete mode 100644 resources/language/Czech/addon.xml delete mode 100644 resources/language/English/addon.xml delete mode 100644 resources/language/German/addon.xml delete mode 100644 resources/language/Spanish/addon.xml diff --git a/resources/language/Czech/addon.xml b/resources/language/Czech/addon.xml deleted file mode 100644 index c290ec3a..00000000 --- a/resources/language/Czech/addon.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - video audio image - - - - - - - Nastavení Plex Serveru - [!IsEmpty(ListItem.DBID) + !StringCompare(ListItem.DBID,-1) | !IsEmpty(ListItem.Property(plexid))] + !IsEmpty(Window(10000).Property(plex_context)) - - - - all - en - GNU GENERAL PUBLIC LICENSE. Version 2, June 1991 - https://forums.plex.tv - https://github.com/croneter/PlexKodiConnect - https://github.com/croneter/PlexKodiConnect - Ú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čí! - - \ No newline at end of file diff --git a/resources/language/Czech/strings.xml b/resources/language/Czech/strings.xml index 326f4d8f..430e1fec 100644 --- a/resources/language/Czech/strings.xml +++ b/resources/language/Czech/strings.xml @@ -513,4 +513,8 @@ Nemohu zastavit běh databáze. Prosím zkuste to později. Odstranit všechny obrázky v mezipaměti? (doporučuje se!) Obnovit všechna nastavení doplňku PlexKodiConnect? (to obvykle není vhodné a je to zbytečné!) + + Amazon Alexa (rozpoznávání hlasu) + Aktivovat Alexu + Browse by folder \ No newline at end of file diff --git a/resources/language/English/addon.xml b/resources/language/English/addon.xml deleted file mode 100644 index d42091f9..00000000 --- a/resources/language/English/addon.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - video audio image - - - - - - - Settings for the Plex Server - [!IsEmpty(ListItem.DBID) + !StringCompare(ListItem.DBID,-1) | !IsEmpty(ListItem.Property(plexid))] + !IsEmpty(Window(10000).Property(plex_context)) - - - - all - en - GNU GENERAL PUBLIC LICENSE. Version 2, June 1991 - 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! - - \ No newline at end of file diff --git a/resources/language/German/addon.xml b/resources/language/German/addon.xml deleted file mode 100644 index 0994ea72..00000000 --- a/resources/language/German/addon.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - video audio image - - - - - - - Einstellungen für den Plex Server - [!IsEmpty(ListItem.DBID) + !StringCompare(ListItem.DBID,-1) | !IsEmpty(ListItem.Property(plexid))] + !IsEmpty(Window(10000).Property(plex_context)) - - - - all - en - GNU GENERAL PUBLIC LICENSE. Version 2, June 1991 - https://forums.plex.tv - https://github.com/croneter/PlexKodiConnect - https://github.com/croneter/PlexKodiConnect - 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! - - \ No newline at end of file diff --git a/resources/language/German/strings.xml b/resources/language/German/strings.xml index 3c5a5515..185b0db7 100644 --- a/resources/language/German/strings.xml +++ b/resources/language/German/strings.xml @@ -516,4 +516,5 @@ Amazon Alexa (Spracherkennung) Alexa aktivieren + Ordner durchsuchen \ No newline at end of file diff --git a/resources/language/Spanish/addon.xml b/resources/language/Spanish/addon.xml deleted file mode 100644 index d42091f9..00000000 --- a/resources/language/Spanish/addon.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - video audio image - - - - - - - Settings for the Plex Server - [!IsEmpty(ListItem.DBID) + !StringCompare(ListItem.DBID,-1) | !IsEmpty(ListItem.Property(plexid))] + !IsEmpty(Window(10000).Property(plex_context)) - - - - all - en - GNU GENERAL PUBLIC LICENSE. Version 2, June 1991 - 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! - - \ No newline at end of file diff --git a/resources/language/Spanish/strings.xml b/resources/language/Spanish/strings.xml index 5f6bdb05..01024e6b 100644 --- a/resources/language/Spanish/strings.xml +++ b/resources/language/Spanish/strings.xml @@ -513,4 +513,8 @@ No se pudo detener la base de datos. Por favor inténtelo más tarde. ¿Eliminar todo el arte del caché? (¡recomendado!) ¿Restablecer todos los ajustes de PlexKodiConnect? (esto generalmente NO es recomendable ni necesario!) + + Amazon Alexa (Voice Recognition) + Activate Alexa + Browse by folder \ No newline at end of file From 325365fa20cdc742ebc10b30743906b3aaefca94 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 9 Mar 2017 16:48:08 +0100 Subject: [PATCH 02/66] Version bump --- addon.xml | 2 +- changelog.txt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index da8e127b..0a38ad10 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 4e056649..7028e835 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,11 @@ +version 1.7.0 +- Amazon Alexa support! Be sure to check the Plex Alexa forum first if you encounter issues; there are still many bugs completely unrelated to PKC +- Plex Channels! +- Browse video nodes by folder/path +- Fix IndexError for playqueues +- Update translations +- Code optimization + version 1.6.5 (beta only) - Plex Channels! - Browse video nodes by folder/path From 90a6c4a4978f1cb4773215a86e34cba79dcfb72e Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 9 Mar 2017 16:49:42 +0100 Subject: [PATCH 03/66] Update addon.xml --- resources/language/English/addon.xml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 resources/language/English/addon.xml diff --git a/resources/language/English/addon.xml b/resources/language/English/addon.xml new file mode 100644 index 00000000..0a38ad10 --- /dev/null +++ b/resources/language/English/addon.xml @@ -0,0 +1,44 @@ + + + + + + + + video audio image + + + + + + + 30416 + [!IsEmpty(ListItem.DBID) + !StringCompare(ListItem.DBID,-1) | !IsEmpty(ListItem.Property(plexid))] + !IsEmpty(Window(10000).Property(plex_context)) + + + + all + + GNU GENERAL PUBLIC LICENSE. Version 2, June 1991 + https://forums.plex.tv + https://github.com/croneter/PlexKodiConnect + + https://github.com/croneter/PlexKodiConnect + Native Integration of Plex into Kodi + Native Integration of Plex into Kodi + Native Integration of Plex into Kodi + Úplná integrace Plexu do Kodi + Komplette Integration von Plex in Kodi + Native Integration of Plex into Kodi + Indbygget Integration af Plex i Kodi + Directe integratie van Plex in 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! + 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! + 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! + Tilslut Kodi til din Plex Media Server. Dette plugin forudsætter, at du administrere alle dine videoer med Plex (og ikke med Kodi). Du kan miste data som allerede er gemt i Kodi video og musik-databaser (dette plugin ændrer direkte i dem). Brug på eget ansvar! + Verbind Kodi met je Plex Media Server. Deze plugin gaat ervan uit dat je al je video's met Plex (en niet met Kodi) beheerd. Je kunt gegevens reeds opgeslagen in de databases voor video en muziek van Kodi (deze plugin wijzigt deze gegevens direct) verliezen. Gebruik op eigen risico! + + From 18d525ae90c102aadd4a1c4e82ad72cf0e52670c Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 10 Mar 2017 06:51:19 +0100 Subject: [PATCH 04/66] Fix Alexa not doing anything --- resources/lib/entrypoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 7cce004b..3573b863 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -106,7 +106,7 @@ def Plex_Node(url, viewOffset, playdirectly=False, node=True): log.info('Plex_Node called with url: %s, viewOffset: %s' % (url, viewOffset)) # Plex redirect, e.g. watch later. Need to get actual URLs - if url.startswith('http'): + if url.startswith('http') or url.startswith('{server}'): xml = downloadutils.DownloadUtils().downloadUrl(url) else: xml = downloadutils.DownloadUtils().downloadUrl('{server}%s' % url) From 16f140770b3e658152d809327662676641e3f951 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 10 Mar 2017 06:52:28 +0100 Subject: [PATCH 05/66] Version bump --- addon.xml | 2 +- changelog.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 0a38ad10..eebc7529 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 7028e835..5b0f474f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +version 1.7.1 +- Fix Alexa not doing anything + version 1.7.0 - Amazon Alexa support! Be sure to check the Plex Alexa forum first if you encounter issues; there are still many bugs completely unrelated to PKC - Plex Channels! From 165e6ca12bec53f1c72670df33a7368ba954a81d Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 12 Mar 2017 13:01:34 +0100 Subject: [PATCH 06/66] Fix Channels not starting playback - Fixes #253 --- resources/lib/entrypoint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 3573b863..023745a9 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -963,7 +963,8 @@ def __build_item(xml_element): listitem = api.CreateListItemFromPlexItem() api.AddStreamInfo(listitem) api.set_listitem_artwork(listitem) - if api.getType() == v.PLEX_TYPE_CLIP: + if (api.getKey().startswith('/system/services') or + api.getKey().startswith('http')): params = { 'mode': "Plex_Node", 'id': xml_element.attrib.get('key'), From 5719794026624cc39e2b4832ca84536853aca718 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 12 Mar 2017 19:05:24 +0100 Subject: [PATCH 07/66] Update Czech translation --- resources/language/Czech/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/language/Czech/strings.xml b/resources/language/Czech/strings.xml index 430e1fec..bccf6693 100644 --- a/resources/language/Czech/strings.xml +++ b/resources/language/Czech/strings.xml @@ -516,5 +516,5 @@ Amazon Alexa (rozpoznávání hlasu) Aktivovat Alexu - Browse by folder + Procházet podle složky \ No newline at end of file From 4328ef9ee0f5ce5fb293fd3cbaf604d771e09c46 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 12 Mar 2017 19:07:10 +0100 Subject: [PATCH 08/66] Version bump --- addon.xml | 2 +- changelog.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index eebc7529..2c1022b1 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 5b0f474f..125137ea 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +version 1.7.2 +- Fix for some channels not starting playback + version 1.7.1 - Fix Alexa not doing anything From 5687149225e6cbd2a7a95135029430f2223e308d Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 13 Mar 2017 20:17:59 +0100 Subject: [PATCH 09/66] Fix KeyError for channels if no media streams - Fixes #253 --- resources/lib/entrypoint.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 023745a9..a854fe60 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -961,7 +961,10 @@ def __build_folder(xml_element, plex_section_id=None): def __build_item(xml_element): api = API(xml_element) listitem = api.CreateListItemFromPlexItem() - api.AddStreamInfo(listitem) + try: + api.AddStreamInfo(listitem) + except: + pass api.set_listitem_artwork(listitem) if (api.getKey().startswith('/system/services') or api.getKey().startswith('http')): From fc6718f698cd41969c4d2ccf96da3a6acf8e7064 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 13 Mar 2017 20:20:05 +0100 Subject: [PATCH 10/66] Pass 'None' instead of empty string in url args --- resources/lib/entrypoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index a854fe60..2a2f2c8a 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -978,7 +978,7 @@ def __build_item(xml_element): params = { 'filename': api.getKey(), 'id': api.getRatingKey(), - 'dbid': listitem.getProperty('dbid') or '', + 'dbid': listitem.getProperty('dbid'), 'mode': "play" } url = "plugin://%s?%s" % (v.ADDON_ID, urlencode(params)) From d2166cd604b1bd84786e8b5c44c0cb99da3acdb2 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 13 Mar 2017 20:25:52 +0100 Subject: [PATCH 11/66] Fix IndexError if we can't get a valid xml from PMS --- resources/lib/playback_starter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index 9e806dba..548f5ac9 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -41,7 +41,7 @@ class Playback_Starter(Thread): xml = GetPlexMetadata(plex_id) try: xml[0].attrib - except (TypeError, AttributeError): + except (IndexError, TypeError, AttributeError): log.error('Could not get a PMS xml for plex id %s' % plex_id) return api = API(xml[0]) From ec1bae3c51ea15c8a8e3f05fc27c28358675151c Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 13 Mar 2017 20:30:33 +0100 Subject: [PATCH 12/66] Fix TypeError for malformed browsing xml --- resources/lib/entrypoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 2a2f2c8a..dc298df4 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -857,7 +857,7 @@ def browse_plex(key=None, plex_section_id=None): containerSize=int(settings('limitindex'))) try: xml[0].attrib - except (ValueError, AttributeError, IndexError): + except (ValueError, AttributeError, IndexError, TypeError): log.error('Could not browse to %s' % key) return xbmcplugin.endOfDirectory(HANDLE, False) From bf6bc26d46fa06b07b3ac883c79e885c5ebd43a3 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 13 Mar 2017 21:39:07 +0100 Subject: [PATCH 13/66] Move plex node navigation, playback to main thread --- default.py | 9 ++-- resources/lib/PlexCompanion.py | 38 +++++++++-------- resources/lib/entrypoint.py | 63 ++-------------------------- resources/lib/playback_starter.py | 68 ++++++++++++++++++++++++++++++- 4 files changed, 96 insertions(+), 82 deletions(-) diff --git a/default.py b/default.py index 1887faea..7eee823b 100644 --- a/default.py +++ b/default.py @@ -63,6 +63,9 @@ class Main(): if mode == 'play': self.play() + elif mode == 'plex_node': + self.play() + elif mode == 'ondeck': entrypoint.getOnDeck(itemid, params.get('type'), @@ -83,9 +86,6 @@ class Main(): entrypoint.getInProgressEpisodes(params['tagname'], int(params['limit'])) - elif mode == 'Plex_Node': - entrypoint.Plex_Node(itemid, params.get('viewOffset')) - elif mode == 'browseplex': entrypoint.browse_plex(key=params.get('key'), plex_section_id=params.get('id')) @@ -168,6 +168,9 @@ class Main(): entrypoint.doMainListing() def play(self): + """ + Start up playback_starter in main Python thread + """ # Put the request into the 'queue' while window('plex_play_new_item'): sleep(50) diff --git a/resources/lib/PlexCompanion.py b/resources/lib/PlexCompanion.py index fd79d8bf..a233e103 100644 --- a/resources/lib/PlexCompanion.py +++ b/resources/lib/PlexCompanion.py @@ -3,20 +3,18 @@ import logging from threading import Thread import Queue from socket import SHUT_RDWR +from urllib import urlencode -from xbmc import sleep +from xbmc import sleep, executebuiltin -from utils import settings, ThreadMethodsAdditionalSuspend, ThreadMethods, \ - window +from utils import settings, ThreadMethodsAdditionalSuspend, ThreadMethods from plexbmchelper import listener, plexgdm, subscribers, functions, \ httppersist, plexsettings from PlexFunctions import ParseContainerKey, GetPlexMetadata from PlexAPI import API import player -from entrypoint import Plex_Node import variables as v - ############################################################################### log = logging.getLogger("PLEX."+__name__) @@ -93,23 +91,27 @@ class PlexCompanion(Thread): self.mgr.playqueue.init_playqueue_from_plex_children( api.getRatingKey()) else: - thread = Thread(target=Plex_Node, - args=('{server}%s' % data.get('key'), - data.get('offset'), - True, - False),) - thread.setDaemon(True) - thread.start() + params = { + 'mode': 'plex_node', + 'key': '{server}%s' % data.get('key'), + 'view_offset': data.get('offset'), + 'play_directly': 'true', + 'node': 'false' + } + executebuiltin('RunPlugin(plugin://%s?%s)' + % (v.ADDON_ID, urlencode(params))) elif (task['action'] == 'playlist' and data.get('address') == 'node.plexapp.com'): # E.g. watch later initiated by Companion - thread = Thread(target=Plex_Node, - args=('{server}%s' % data.get('key'), - data.get('offset'), - True),) - thread.setDaemon(True) - thread.start() + params = { + 'mode': 'plex_node', + 'key': '{server}%s' % data.get('key'), + 'view_offset': data.get('offset'), + 'play_directly': 'true' + } + executebuiltin('RunPlugin(plugin://%s?%s)' + % (v.ADDON_ID, urlencode(params))) elif task['action'] == 'playlist': # Get the playqueue ID diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index dc298df4..9f440d61 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -97,62 +97,6 @@ def togglePlexTV(): sound=False) -def Plex_Node(url, viewOffset, playdirectly=False, node=True): - """ - Called only for a SINGLE element for Plex.tv watch later - - Always to return with a "setResolvedUrl" - """ - log.info('Plex_Node called with url: %s, viewOffset: %s' - % (url, viewOffset)) - # Plex redirect, e.g. watch later. Need to get actual URLs - if url.startswith('http') or url.startswith('{server}'): - xml = downloadutils.DownloadUtils().downloadUrl(url) - else: - xml = downloadutils.DownloadUtils().downloadUrl('{server}%s' % url) - try: - xml[0].attrib - except: - log.error('Could not download PMS metadata') - return - if viewOffset != '0': - try: - viewOffset = int(v.PLEX_TO_KODI_TIMEFACTOR * float(viewOffset)) - except: - pass - else: - window('plex_customplaylist.seektime', value=str(viewOffset)) - log.info('Set resume point to %s' % str(viewOffset)) - api = API(xml[0]) - typus = v.KODI_PLAYLIST_TYPE_FROM_PLEX_TYPE[api.getType()] - if node is True: - plex_id = None - kodi_id = 'plexnode' - else: - plex_id = api.getRatingKey() - kodi_id = None - with plexdb.Get_Plex_DB() as plex_db: - plexdb_item = plex_db.getItem_byId(plex_id) - try: - kodi_id = plexdb_item[0] - except TypeError: - log.info('Couldnt find item %s in Kodi db' - % api.getRatingKey()) - playqueue = Playqueue().get_playqueue_from_type(typus) - result = pbutils.PlaybackUtils(xml, playqueue).play( - plex_id, - kodi_id=kodi_id, - plex_lib_UUID=xml.attrib.get('librarySectionUUID')) - if result.listitem: - listitem = convert_PKC_to_listitem(result.listitem) - else: - return - if playdirectly: - Player().play(listitem.getfilename(), listitem) - else: - xbmcplugin.setResolvedUrl(HANDLE, True, listitem) - - ##### DO RESET AUTH ##### def resetAuth(): # User tried login and failed too many times @@ -969,10 +913,9 @@ def __build_item(xml_element): if (api.getKey().startswith('/system/services') or api.getKey().startswith('http')): params = { - 'mode': "Plex_Node", - 'id': xml_element.attrib.get('key'), - 'viewOffset': xml_element.attrib.get('viewOffset', '0'), - 'plex_type': xml_element.attrib.get('type') + 'mode': 'plex_node', + 'key': xml_element.attrib.get('key'), + 'view_offset': xml_element.attrib.get('viewOffset', '0'), } else: params = { diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index 548f5ac9..f8883c07 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -4,6 +4,8 @@ import logging from threading import Thread from urlparse import parse_qsl +from xbmc import Player + from PKC_listitem import PKC_ListItem from pickler import pickle_me, Playback_Successful from playbackutils import PlaybackUtils @@ -12,6 +14,9 @@ from PlexFunctions import GetPlexMetadata from PlexAPI import API from playqueue import lock import variables as v +from downloadutils import DownloadUtils +from PKC_listitem import convert_PKC_to_listitem +import plexdb_functions as plexdb ############################################################################### log = logging.getLogger("PLEX."+__name__) @@ -66,9 +71,64 @@ class Playback_Starter(Thread): % self.playqueue.playqueues) return result + def process_plex_node(self, url, viewOffset, directplay=False, + node=True): + """ + Called for Plex directories or redirect for playback (e.g. trailers, + clips, watchlater) + """ + log.info('process_plex_node called with url: %s, viewOffset: %s' + % (url, viewOffset)) + # Plex redirect, e.g. watch later. Need to get actual URLs + if url.startswith('http') or url.startswith('{server}'): + xml = DownloadUtils().downloadUrl(url) + else: + xml = DownloadUtils().downloadUrl('{server}%s' % url) + try: + xml[0].attrib + except: + log.error('Could not download PMS metadata') + return + if viewOffset != '0': + try: + viewOffset = int(v.PLEX_TO_KODI_TIMEFACTOR * float(viewOffset)) + except: + pass + else: + window('plex_customplaylist.seektime', value=str(viewOffset)) + log.info('Set resume point to %s' % str(viewOffset)) + api = API(xml[0]) + typus = v.KODI_PLAYLIST_TYPE_FROM_PLEX_TYPE[api.getType()] + if node is True: + plex_id = None + kodi_id = 'plexnode' + else: + plex_id = api.getRatingKey() + kodi_id = None + with plexdb.Get_Plex_DB() as plex_db: + plexdb_item = plex_db.getItem_byId(plex_id) + try: + kodi_id = plexdb_item[0] + except TypeError: + log.info('Couldnt find item %s in Kodi db' + % api.getRatingKey()) + playqueue = self.playqueue.get_playqueue_from_type(typus) + with lock: + result = PlaybackUtils(xml, playqueue).play( + plex_id, + kodi_id=kodi_id, + plex_lib_UUID=xml.attrib.get('librarySectionUUID')) + if directplay: + if result.listitem: + listitem = convert_PKC_to_listitem(result.listitem) + Player().play(listitem.getfilename(), listitem) + else: + return result + def triage(self, item): - mode, params = item.split('?', 1) + _, params = item.split('?', 1) params = dict(parse_qsl(params)) + mode = params.get('mode') log.debug('Received mode: %s, params: %s' % (mode, params)) try: if mode == 'play': @@ -76,6 +136,12 @@ class Playback_Starter(Thread): params.get('dbid')) elif mode == 'companion': result = self.process_companion() + elif mode == 'plex_node': + result = self.process_plex_node( + params.get('key'), + params.get('view_offset'), + directplay=True if params.get('play_directly') else False, + node=False if params.get('node') == 'false' else True) except: log.error('Error encountered for mode %s, params %s' % (mode, params)) From c4a829b83143db9c1fa2fdc272a3b35fc51670ad Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 13 Mar 2017 21:40:39 +0100 Subject: [PATCH 14/66] Version bump --- addon.xml | 2 +- changelog.txt | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 2c1022b1..46d9fc40 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 125137ea..016ba49a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,10 @@ +version 1.7.3 (beta only) +- Fix KeyError for channels if no media streams +- Move plex node navigation, playback to main thread +- Fix TypeError for malformed browsing xml +- Fix IndexError if we can't get a valid xml from PMS +- Pass 'None' instead of empty string in url args + version 1.7.2 - Fix for some channels not starting playback From 6fdff941ea10b5bd7bac0f649f2423e26cbfa5c8 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Tue, 14 Mar 2017 18:45:05 +0100 Subject: [PATCH 15/66] Fix AttributeError due to missing Kodi sort methods - Partially fixes #253 --- resources/lib/variables.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/resources/lib/variables.py b/resources/lib/variables.py index cf05a893..20a6c098 100644 --- a/resources/lib/variables.py +++ b/resources/lib/variables.py @@ -329,7 +329,6 @@ SORT_METHODS_SONGS = ( 'SORT_METHOD_TRACKNUM', 'SORT_METHOD_DURATION', 'SORT_METHOD_ARTIST', - 'SORT_METHOD_ARTIST_AND_YEAR', 'SORT_METHOD_ALBUM', 'SORT_METHOD_SONG_RATING', 'SORT_METHOD_SONG_USER_RATING' @@ -341,7 +340,6 @@ SORT_METHODS_ARTISTS = ( 'SORT_METHOD_TRACKNUM', 'SORT_METHOD_DURATION', 'SORT_METHOD_ARTIST', - 'SORT_METHOD_ARTIST_AND_YEAR', 'SORT_METHOD_ALBUM', ) @@ -351,6 +349,5 @@ SORT_METHODS_ALBUMS = ( 'SORT_METHOD_TRACKNUM', 'SORT_METHOD_DURATION', 'SORT_METHOD_ARTIST', - 'SORT_METHOD_ARTIST_AND_YEAR', 'SORT_METHOD_ALBUM', ) From 264782c787fe4f3c0fe42d1af1587f52a4635fce Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Wed, 15 Mar 2017 19:26:55 +0100 Subject: [PATCH 16/66] Fix Kodi setContent for images --- resources/lib/entrypoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 9f440d61..d2e0e77c 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -847,7 +847,7 @@ def browse_plex(key=None, plex_section_id=None): xbmcplugin.setContent(HANDLE, 'movies') sort_methods = v.SORT_METHODS_CLIPS elif photos is True: - xbmcplugin.setContent(HANDLE, 'files') + xbmcplugin.setContent(HANDLE, 'images') sort_methods = v.SORT_METHODS_PHOTOS elif tvshows is True: xbmcplugin.setContent(HANDLE, 'tvshows') From 0d7cef20329be47386a99036b670e16a81bf88d0 Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 16 Mar 2017 19:22:23 +0100 Subject: [PATCH 17/66] Update README.md --- README.md | 55 ++++++++++++++++++++++--------------------------------- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index fdcf2ec3..b5a5949a 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ PKC combines the best of Kodi - ultra smooth navigation, beautiful and highly cu Have a look at [some screenshots](https://github.com/croneter/PlexKodiConnect/wiki/Some-PKC-Screenshots) to see what's possible. -### Call for Translations +### Help Translate! -Please help translate PlexKodiConnect into your language: [visit crowdin.com](https://crowdin.com/project/plexkodiconnect/invite) +Please help translate PlexKodiConnect into your language: [crowdin.com](https://crowdin.com/project/plexkodiconnect/invite) ### Content @@ -32,18 +32,13 @@ Please help translate PlexKodiConnect into your language: [visit crowdin.com](ht ### Warning Use at your own risk! 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. Don't worry if you want Plex to manage all your media (like you should ;-)). -### What does PKC do and how is it different from the official ['Plex for Kodi'](https://www.plex.tv/apps/computer/kodi/)? - -With other Plex addons for Kodi such as the official [Plex for Kodi](https://www.plex.tv/apps/computer/kodi/) or [PlexBMC](https://forums.plex.tv/discussion/106593/plexbmc-xbmc-add-on-to-connect-to-plex-media-server) there are a couple of issues: -- Other Kodi addons such as NextAired, remote apps and others won't work -- You can only use special Kodi skins -- Slow speed: when browsing data has to be retrieved from the server. Especially on slower devices this can take too much time and you will notice artwork being loaded slowly while you browse the library -- All kinds of workarounds are needed to get the best experience on Kodi clients - -PKC synchronizes your media from your Plex server to the native Kodi database. Because PKC uses the native Kodi database, the above limitations are gone! -- Use any Kodi skin you want! -- You can browse your media at full speed, images are cached -- All other Kodi addons will be able to "see" your media, thinking it's normal Kodi stuff +### What does PKC do? +PKC synchronizes your media from your Plex server to the native Kodi database. Hence: +- Use virtually any other Kodi add-on +- Use any Kodi skin, completely customize Kodi's look +- Browse your media at full speed (cached artwork) +- Automatically get additional artwork (more than e.g. Plex offers) +- Enjoy Plex features using the Kodi interface Some people argue that PKC is 'hacky' because of the way it directly accesses the Kodi database. See [here for a more thorough discussion](https://github.com/croneter/PlexKodiConnect/wiki/Is-PKC-'hacky'%3F). @@ -56,13 +51,11 @@ Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official ### Important Notes -1. If you are using a **low CPU device like a Raspberry Pi or a CuBox**, PKC might be instable or crash during initial sync. Lower the number of threads in the [PKC settings under Sync Options](https://github.com/croneter/PlexKodiConnect/wiki/PKC-settings#sync-options): `Limit artwork cache threads: 5` -Don't forget to reboot Kodi after that. +1. If you are using a **low CPU device like a Raspberry Pi or a CuBox**, PKC might be instable or crash during initial sync. Lower the number of threads in the [PKC settings under Sync Options](https://github.com/croneter/PlexKodiConnect/wiki/PKC-settings#sync-options). Don't forget to reboot Kodi after that. 2. **Compatibility**: * PKC is currently not compatible with Kodi's Video Extras plugin. **Deactivate Video Extras** if trailers/movies start randomly playing. * PKC is not (and will never be) compatible with the **MySQL database replacement** in Kodi. In fact, PKC replaces the MySQL functionality because it acts as a "man in the middle" for your entire media library. * If **another plugin is not working** like it's supposed to, try to use [PKC direct paths](https://github.com/croneter/PlexKodiConnect/wiki/Direct-Paths) -3. If you post logs, your **Plex tokens** might be included. Be sure to double and triple check for tokens before posting any logs anywhere by searching for `token` ### Donations I'm not in any way affiliated with Plex. Thank you very much for a small donation via ko-fi.com and PayPal if you appreciate PKC. @@ -73,18 +66,7 @@ I'm not in any way affiliated with Plex. Thank you very much for a small donatio ### What is currently supported? PKC currently provides the following features: -- All Plex library types - + Movies and Home Videos - + TV Shows - + Music - + Pictures and Photos -- Different PKC interface languages: - + English - + German - + Czech, thanks @Pavuucek - + Spanish, thanks @bartolomesoriano - + Danish, thanks @FIGHT - + More coming up: [you can help!](https://crowdin.com/project/plexkodiconnect/invite) +- [Amazon Alexa voice recognition](https://www.plex.tv/apps/streaming-devices/amazon-alexa) - [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) @@ -95,10 +77,21 @@ PKC currently provides the following features: + Landscapes + Clear art + Extra fanart backgrounds +- PKC interface languages: + + English + + German + + Czech, thanks @Pavuucek + + Spanish, thanks @bartolomesoriano + + Danish, thanks @FIGHT + + More coming up: [you can help!](https://crowdin.com/project/plexkodiconnect/invite) - Automatically group movies into [movie sets](http://kodi.wiki/view/movie_sets) - Direct play from network paths (e.g. "\\\\server\\Plex\\movie.mkv") instead of streaming from slow HTTP (e.g. "192.168.1.1:32400"). You have to setup all your Plex libraries to point to such network paths. Do have a look at [the wiki here](https://github.com/croneter/PlexKodiConnect/wiki/Direct-Paths) - Delete PMS items from the Kodi context menu +### Request a New Feature + +[![Feature Requests](http://feathub.com/croneter/PlexKodiConnect?format=svg)](http://feathub.com/croneter/PlexKodiConnect) + ### Known Larger Issues Solutions are unlikely due to the nature of these issues @@ -120,10 +113,6 @@ However, some changes to individual items are instantly detected, e.g. if you ma Have a look at the [Github Issues Page](https://github.com/croneter/PlexKodiConnect/issues). Before you open your own issue, please read [How to report a bug](https://github.com/croneter/PlexKodiConnect/wiki/How-to-Report-A-Bug). -### Requests for new features - -[![Feature Requests](http://feathub.com/croneter/PlexKodiConnect?format=svg)](http://feathub.com/croneter/PlexKodiConnect) - ### Checkout the PKC Wiki The [Wiki can be found here](https://github.com/croneter/PlexKodiConnect/wiki) and will hopefully answer all your questions. You can even edit the wiki yourself! From 092f5696cfe701363b09d0623bef8208e4c5d13f Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 16 Mar 2017 19:24:05 +0100 Subject: [PATCH 18/66] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b5a5949a..eb885850 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Please help translate PlexKodiConnect into your language: [crowdin.com](https:// ### Content * [**Warning**](#warning) -* [**What does PKC do and how is it different from the official 'Plex for Kodi'**](#what-does-pkc-do-and-how-is-it-different-from-the-official-plex-for-kod) +* [**What does PKC do**](#what-does-pkc-do?) * [**Download and Installation**](#download-and-installation) * [**Important notes**](#important-notes) * [**Donations**](#donations) @@ -113,7 +113,7 @@ However, some changes to individual items are instantly detected, e.g. if you ma Have a look at the [Github Issues Page](https://github.com/croneter/PlexKodiConnect/issues). Before you open your own issue, please read [How to report a bug](https://github.com/croneter/PlexKodiConnect/wiki/How-to-Report-A-Bug). -### Checkout the PKC Wiki +### PKC Wiki & Frequently Asked Questions The [Wiki can be found here](https://github.com/croneter/PlexKodiConnect/wiki) and will hopefully answer all your questions. You can even edit the wiki yourself! ### Credits From 31c5c8918b81a9d69b1d6375c87ff6930341f662 Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 16 Mar 2017 19:26:08 +0100 Subject: [PATCH 19/66] Update README.md --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index eb885850..c52e2aef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -##Status +## Status [![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/pulls) @@ -18,14 +18,14 @@ Please help translate PlexKodiConnect into your language: [crowdin.com](https:// ### Content * [**Warning**](#warning) -* [**What does PKC do**](#what-does-pkc-do?) +* [**What does PKC do**](#what-does-pkc-do) * [**Download and Installation**](#download-and-installation) * [**Important notes**](#important-notes) * [**Donations**](#donations) -* [**What is currently supported?**](#what-is-currently-supported) +* [**PKC Features**](#pkc-features) * [**Known Larger Issues**](#known-larger-issues) * [**Issues being worked on**](#issues-being-worked-on) -* [**Requests for new features**](#requests-for-new-features) +* [**Request a New Feature**](#request-a-new-feature) * [**Checkout the PKC Wiki**](#checkout-the-pkc-wiki) * [**Credits**](#credits) @@ -63,9 +63,8 @@ I'm not in any way affiliated with Plex. Thank you very much for a small donatio [ ![Download](https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a|alt=Buy Me a Coffee)](https://ko-fi.com/A8182EB) -### What is currently supported? +### PKC Features -PKC currently provides the following features: - [Amazon Alexa voice recognition](https://www.plex.tv/apps/streaming-devices/amazon-alexa) - [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 From 80a783aa0b8d248b09cffb4772c34806c45ead9f Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 16 Mar 2017 19:27:40 +0100 Subject: [PATCH 20/66] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c52e2aef..2d1763ca 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ Please help translate PlexKodiConnect into your language: [crowdin.com](https:// * [**Important notes**](#important-notes) * [**Donations**](#donations) * [**PKC Features**](#pkc-features) +* [**Request a New Feature**](#request-a-new-feature) * [**Known Larger Issues**](#known-larger-issues) * [**Issues being worked on**](#issues-being-worked-on) -* [**Request a New Feature**](#request-a-new-feature) -* [**Checkout the PKC Wiki**](#checkout-the-pkc-wiki) +* [**PKC Wiki & Frequently Asked Questions**](#pkc-wiki--frequently-asked-questions) * [**Credits**](#credits) ### Warning From a29ca61b0390f275cc3796af139adbf10ded21dc Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 17 Mar 2017 08:11:32 +0100 Subject: [PATCH 21/66] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d1763ca..855b6092 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Please help translate PlexKodiConnect into your language: [crowdin.com](https:// ### Content * [**Warning**](#warning) -* [**What does PKC do**](#what-does-pkc-do) +* [**What does PKC do?**](#what-does-pkc-do) * [**Download and Installation**](#download-and-installation) * [**Important notes**](#important-notes) * [**Donations**](#donations) @@ -61,7 +61,7 @@ Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official I'm not in any way affiliated with Plex. Thank you very much for a small donation via ko-fi.com and PayPal if you appreciate PKC. **Full disclaimer:** I will see your name and address on my PayPal account. Rest assured that I will not share this with anyone. -[ ![Download](https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a|alt=Buy Me a Coffee)](https://ko-fi.com/A8182EB) +[![Download](https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a|alt=Buy Me a Coffee)](https://ko-fi.com/A8182EB) ### PKC Features From be322db3148604b1f7d000e1042f2b2a6184f348 Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 17 Mar 2017 08:13:40 +0100 Subject: [PATCH 22/66] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 855b6092..1c54fd04 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official I'm not in any way affiliated with Plex. Thank you very much for a small donation via ko-fi.com and PayPal if you appreciate PKC. **Full disclaimer:** I will see your name and address on my PayPal account. Rest assured that I will not share this with anyone. -[![Download](https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a|alt=Buy Me a Coffee)](https://ko-fi.com/A8182EB) +[![Donations](https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a)](https://ko-fi.com/A8182EB) ### PKC Features From 109c8c50e6f1db4b39878b10bc8a3612da50d7cf Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 17 Mar 2017 15:27:08 +0100 Subject: [PATCH 23/66] Update README.md --- README.md | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1c54fd04..4e3fc701 100644 --- a/README.md +++ b/README.md @@ -19,14 +19,14 @@ Please help translate PlexKodiConnect into your language: [crowdin.com](https:// ### Content * [**Warning**](#warning) * [**What does PKC do?**](#what-does-pkc-do) +* [**PKC Features**](#pkc-features) +* [**PKC Wiki & Frequently Asked Questions**](#pkc-wiki--frequently-asked-questions) * [**Download and Installation**](#download-and-installation) * [**Important notes**](#important-notes) * [**Donations**](#donations) -* [**PKC Features**](#pkc-features) * [**Request a New Feature**](#request-a-new-feature) * [**Known Larger Issues**](#known-larger-issues) * [**Issues being worked on**](#issues-being-worked-on) -* [**PKC Wiki & Frequently Asked Questions**](#pkc-wiki--frequently-asked-questions) * [**Credits**](#credits) ### Warning @@ -42,27 +42,6 @@ PKC synchronizes your media from your Plex server to the native Kodi database. H Some people argue that PKC is 'hacky' because of the way it directly accesses the Kodi database. See [here for a more thorough discussion](https://github.com/croneter/PlexKodiConnect/wiki/Is-PKC-'hacky'%3F). -### Download and Installation -[ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) - -Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [installation guideline on how to do this](https://github.com/croneter/PlexKodiConnect/wiki/Installation). - -**Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) - -### Important Notes - -1. If you are using a **low CPU device like a Raspberry Pi or a CuBox**, PKC might be instable or crash during initial sync. Lower the number of threads in the [PKC settings under Sync Options](https://github.com/croneter/PlexKodiConnect/wiki/PKC-settings#sync-options). Don't forget to reboot Kodi after that. -2. **Compatibility**: - * PKC is currently not compatible with Kodi's Video Extras plugin. **Deactivate Video Extras** if trailers/movies start randomly playing. - * PKC is not (and will never be) compatible with the **MySQL database replacement** in Kodi. In fact, PKC replaces the MySQL functionality because it acts as a "man in the middle" for your entire media library. - * If **another plugin is not working** like it's supposed to, try to use [PKC direct paths](https://github.com/croneter/PlexKodiConnect/wiki/Direct-Paths) - -### Donations -I'm not in any way affiliated with Plex. Thank you very much for a small donation via ko-fi.com and PayPal if you appreciate PKC. -**Full disclaimer:** I will see your name and address on my PayPal account. Rest assured that I will not share this with anyone. - -[![Donations](https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a)](https://ko-fi.com/A8182EB) - ### PKC Features - [Amazon Alexa voice recognition](https://www.plex.tv/apps/streaming-devices/amazon-alexa) @@ -87,6 +66,30 @@ I'm not in any way affiliated with Plex. Thank you very much for a small donatio - Direct play from network paths (e.g. "\\\\server\\Plex\\movie.mkv") instead of streaming from slow HTTP (e.g. "192.168.1.1:32400"). You have to setup all your Plex libraries to point to such network paths. Do have a look at [the wiki here](https://github.com/croneter/PlexKodiConnect/wiki/Direct-Paths) - Delete PMS items from the Kodi context menu +### PKC Wiki & Frequently Asked Questions +The [Wiki can be found here](https://github.com/croneter/PlexKodiConnect/wiki) and will hopefully answer all your questions. You can even edit the wiki yourself! + +### Download and Installation +[ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) + +Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [installation guideline on how to do this](https://github.com/croneter/PlexKodiConnect/wiki/Installation). + +**Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) + +### Important Notes + +1. If you are using a **low CPU device like a Raspberry Pi or a CuBox**, PKC might be instable or crash during initial sync. Lower the number of threads in the [PKC settings under Sync Options](https://github.com/croneter/PlexKodiConnect/wiki/PKC-settings#sync-options). Don't forget to reboot Kodi after that. +2. **Compatibility**: + * PKC is currently not compatible with Kodi's Video Extras plugin. **Deactivate Video Extras** if trailers/movies start randomly playing. + * PKC is not (and will never be) compatible with the **MySQL database replacement** in Kodi. In fact, PKC replaces the MySQL functionality because it acts as a "man in the middle" for your entire media library. + * If **another plugin is not working** like it's supposed to, try to use [PKC direct paths](https://github.com/croneter/PlexKodiConnect/wiki/Direct-Paths) + +### Donations +I'm not in any way affiliated with Plex. Thank you very much for a small donation via ko-fi.com and PayPal if you appreciate PKC. +**Full disclaimer:** I will see your name and address on my PayPal account. Rest assured that I will not share this with anyone. + +[![Donations](https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a)](https://ko-fi.com/A8182EB) + ### Request a New Feature [![Feature Requests](http://feathub.com/croneter/PlexKodiConnect?format=svg)](http://feathub.com/croneter/PlexKodiConnect) @@ -112,9 +115,6 @@ However, some changes to individual items are instantly detected, e.g. if you ma Have a look at the [Github Issues Page](https://github.com/croneter/PlexKodiConnect/issues). Before you open your own issue, please read [How to report a bug](https://github.com/croneter/PlexKodiConnect/wiki/How-to-Report-A-Bug). -### PKC Wiki & Frequently Asked Questions -The [Wiki can be found here](https://github.com/croneter/PlexKodiConnect/wiki) and will hopefully answer all your questions. You can even edit the wiki yourself! - ### Credits - PlexKodiConnect shamelessly uses pretty much all the code of "Emby for Kodi" by the awesome Emby team (see https://github.com/MediaBrowser/plugin.video.emby). Thanks for sharing guys!! From aa900c6b8891a4a078b9389c063c0058de230dbc Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 12:14:16 +0100 Subject: [PATCH 24/66] Rewire Kodi ListItem stuff --- resources/lib/PKC_listitem.py | 65 +++++++-------- resources/lib/PlexAPI.py | 126 ++++++++++++++---------------- resources/lib/entrypoint.py | 18 ++--- resources/lib/playback_starter.py | 2 - 4 files changed, 101 insertions(+), 110 deletions(-) diff --git a/resources/lib/PKC_listitem.py b/resources/lib/PKC_listitem.py index 2bb92a21..6e16fcb9 100644 --- a/resources/lib/PKC_listitem.py +++ b/resources/lib/PKC_listitem.py @@ -14,18 +14,21 @@ def convert_PKC_to_listitem(PKC_listitem): """ Insert a PKC_listitem and you will receive a valid XBMC listitem """ - listitem = ListItem() - for func, args in PKC_listitem.data.items(): - if isinstance(args, list): - for arg in args: - getattr(listitem, func)(*arg) - elif isinstance(args, dict): - for arg in args.items(): - getattr(listitem, func)(*arg) - elif args is None: - continue - else: - getattr(listitem, func)(args) + data = PKC_listitem.data + log.debug('data is: %s' % data) + listitem = ListItem(label=data.get('label'), + label2=data.get('label2'), + path=data.get('path')) + if data['info']: + listitem.setInfo(**data['info']) + for stream in data['stream_info']: + listitem.addStreamInfo(**stream) + if data['art']: + listitem.setArt(data['art']) + for key, value in data['property'].iteritems(): + listitem.setProperty(key, value) + if data['subtitles']: + listitem.setSubtitles(data['subtitles']) return listitem @@ -38,14 +41,14 @@ class PKC_ListItem(object): """ def __init__(self, label=None, label2=None, path=None): self.data = { - 'addStreamInfo': [], # (type, values: dict { label: value }) - 'setArt': [], # dict: { label: value } - 'setInfo': {}, # type: infoLabel (dict { label: value }) - 'setLabel': label, # string - 'setLabel2': label2, # string - 'setPath': path, # string - 'setProperty': {}, # (key, value) - 'setSubtitles': [], # string + 'stream_info': [], # (type, values: dict { label: value }) + 'art': {}, # dict + 'info': {}, # type: infoLabel (dict { label: value }) + 'label': label, # string + 'label2': label2, # string + 'path': path, # string + 'property': {}, # (key, value) + 'subtitles': [], # strings } def addContextMenuItems(self, items, replaceItems): @@ -87,19 +90,19 @@ class PKC_ListItem(object): - Subtitle Values: - language : string (en) """ - self.data['addStreamInfo'].append((type, values)) + self.data['stream_info'].append({'type': type, 'values': values}) def getLabel(self): """ Returns the listitem label """ - return self.data['setLabel'] + return self.data.get('label') def getLabel2(self): """ Returns the listitem label. """ - return self.data['setLabel2'] + return self.data.get('label2') def getMusicInfoTag(self): """ @@ -118,7 +121,7 @@ class PKC_ListItem(object): Once you use a keyword, all following arguments require the keyword. """ - return self.data['setProperty'].get(key) + return self.data['property'].get(key) def getVideoInfoTag(self): """ @@ -172,7 +175,7 @@ class PKC_ListItem(object): - landscape : string - image filename - icon : string - image filename """ - self.data['setArt'].append(values) + self.data['art'].update(values) def setContentLookup(self, enable): """ @@ -270,21 +273,21 @@ class PKC_ListItem(object): - exif : string (See CPictureInfoTag::TranslateString in PictureInfoTag.cpp for valid strings) """ - self.data['setInfo'][type] = infoLabels + self.data['info'] = {'type': type, 'infoLabels': infoLabels} def setLabel(self, label): """ Sets the listitem's label. label : string or unicode - text string. """ - self.data['setLabel'] = label + self.data['label'] = label def setLabel2(self, label): """ Sets the listitem's label2. label : string or unicode - text string. """ - self.data['setLabel2'] = label + self.data['label2'] = label def setMimeType(self, mimetype): """ @@ -303,7 +306,7 @@ class PKC_ListItem(object): *Note, You can use the above as keywords for arguments. """ - self.data['setPath'] = path + self.data['path'] = path def setProperty(self, key, value): """ @@ -321,7 +324,7 @@ class PKC_ListItem(object): start playback of an item. Others may be used in the skin to add extra information, such as 'WatchedCount' for tvshow items """ - self.data['setProperty'][key] = value + self.data['property'][key] = value def setSubtitles(self, subtitles): """ @@ -331,4 +334,4 @@ class PKC_ListItem(object): - listitem.setSubtitles(['special://temp/example.srt', 'http://example.com/example.srt' ]) """ - self.data['setSubtitles'].extend(([subtitles],)) + self.data['subtitles'].extend(subtitles) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index e78621d5..3562f9a4 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -1208,6 +1208,36 @@ class API(): ans = unquote(ans).decode('latin1') return ans + def get_picture_path(self): + """ + Returns the item's picture path (transcode, if necessary) as string + """ + extension = self.item[0][0].attrib['key'][self.item[0][0].attrib['key'].rfind('.'):].lower() + if (window('plex_force_transcode_pix') == 'true' or + extension not in v.KODI_SUPPORTED_IMAGES): + # Let Plex transcode + # max width/height supported by plex image transcoder is 1920x1080 + path = self.server + PlexAPI().getTranscodeImagePath( + self.item[0][0].attrib.get('key'), + window('pms_token'), + "%s%s" % (self.server, self.item[0][0].attrib.get('key')), + 1920, + 1080) + else: + # Don't transcode + if window('useDirectPaths') == 'true': + # Addon Mode. Just give the path of the file to Kodi + path = self.addPlexCredentialsToUrl( + '%s%s' % (window('pms_server'), + self.item[0][0].attrib['key'])) + else: + # Native direct paths + path = self.validatePlayurl( + self.getFilePath(forceFirstMediaStream=True), + 'photo') + path = tryEncode(path) + return path + def getTVShowPath(self): """ Returns the direct path to the TV show, e.g. '\\NAS\tv\series' @@ -2275,18 +2305,6 @@ class API(): log.info('Found external subs: %s' % externalsubs) return externalsubs - def CreateListItemFromPlexItem(self, - listItem=None, - appendShowTitle=False, - appendSxxExx=False): - if self.getType() == 'photo': - listItem = self._createPhotoListItem(listItem) - else: - listItem = self._createVideoListItem(listItem, - appendShowTitle, - appendSxxExx) - return listItem - def GetKodiPremierDate(self): """ Takes Plex' originallyAvailableAt of the form "yyyy-mm-dd" and returns @@ -2301,7 +2319,24 @@ class API(): date = None return date - def _createPhotoListItem(self, listItem=None): + def CreateListItemFromPlexItem(self, + listItem=None, + appendShowTitle=False, + appendSxxExx=False): + if self.getType() == v.PLEX_TYPE_PHOTO: + listItem = self.__createPhotoListItem(listItem) + # Only set the bare minimum of artwork + listItem.setArt({'icon': 'DefaultPicture.png', + 'fanart': self.__getOneArtwork('thumb')}) + else: + listItem = self.__createVideoListItem(listItem, + appendShowTitle, + appendSxxExx) + self.add_video_streams(listItem) + self.set_listitem_artwork(listItem) + return listItem + + def __createPhotoListItem(self, listItem=None): """ Use for photo items only """ @@ -2310,63 +2345,21 @@ class API(): listItem = xbmcgui.ListItem(title) else: listItem.setLabel(title) - listItem.setProperty('IsPlayable', 'true') - extension = self.item[0][0].attrib['key'][self.item[0][0].attrib['key'].rfind('.'):].lower() - if (window('plex_force_transcode_pix') == 'true' or - extension not in v.KODI_SUPPORTED_IMAGES): - # Let Plex transcode - # max width/height supported by plex image transcoder is 1920x1080 - path = self.server + PlexAPI().getTranscodeImagePath( - self.item[0][0].attrib.get('key'), - window('pms_token'), - "%s%s" % (self.server, self.item[0][0].attrib.get('key')), - 1920, - 1080) - else: - # Don't transcode - if window('useDirectPaths') == 'true': - # Addon Mode. Just give the path of the file to Kodi - path = self.addPlexCredentialsToUrl( - '%s%s' % (window('pms_server'), - self.item[0][0].attrib['key'])) - else: - # Native direct paths - path = self.validatePlayurl( - self.getFilePath(forceFirstMediaStream=True), - 'photo') - - path = tryEncode(path) metadata = { 'date': self.GetKodiPremierDate(), - 'picturepath': path, 'size': long(self.item[0][0].attrib.get('size', 0)), 'exif:width': self.item[0].attrib.get('width', ''), 'exif:height': self.item[0].attrib.get('height', ''), - 'title': title } - listItem.setInfo('pictures', infoLabels=metadata) - try: - if int(metadata['exif:width']) > int(metadata['exif:height']): - # add image as fanart for use with skinhelper auto thumb/ - # backgrund creation - listItem.setArt({'fanart': path}) - except ValueError: - pass - # Stuff that we CANNOT set with listItem.setInfo - listItem.setProperty('path', path) + listItem.setInfo(type='image', infoLabels=metadata) listItem.setProperty('plot', self.getPlot()) listItem.setProperty('plexid', self.getRatingKey()) - # We do NOT set these props - # listItem.setProperty('isPlayable', 'true') - # listItem.setProperty('isFolder', 'true') - # Further stuff - listItem.setArt({'icon': 'DefaultPicture.png'}) return listItem - def _createVideoListItem(self, - listItem=None, - appendShowTitle=False, - appendSxxExx=False): + def __createVideoListItem(self, + listItem=None, + appendShowTitle=False, + appendSxxExx=False): """ Use for video items only Call on a child level of PMS xml response (e.g. in a for loop) @@ -2383,7 +2376,8 @@ class API(): if listItem is None: listItem = xbmcgui.ListItem(title) - listItem.setProperty('IsPlayable', 'true') + else: + listItem.setLabel(title) # Video items, e.g. movies and episodes or clips people = self.getPeople() @@ -2410,8 +2404,7 @@ class API(): listItem.setProperty('resumetime', str(userdata['Resume'])) listItem.setProperty('totaltime', str(userdata['Runtime'])) - if typus == "episode": - # Only for tv shows + if typus == v.PLEX_TYPE_EPISODE: key, show, season, episode = self.getEpisodeDetails() season = -1 if season is None else int(season) episode = -1 if episode is None else int(episode) @@ -2426,7 +2419,9 @@ class API(): listItem.setArt({'icon': 'DefaultTVShows.png'}) if appendShowTitle is True: title = "%s - %s " % (show, title) - elif typus == "movie": + if appendShowTitle or appendSxxExx: + listItem.setLabel(title) + elif typus == v.PLEX_TYPE_MOVIE: listItem.setArt({'icon': 'DefaultMovies.png'}) else: # E.g. clips, trailers, ... @@ -2442,11 +2437,10 @@ class API(): pass # Expensive operation metadata['title'] = title - listItem.setLabel(title) listItem.setInfo('video', infoLabels=metadata) return listItem - def AddStreamInfo(self, listItem): + def add_video_streams(self, listItem): """ Add media stream information to xbmcgui.ListItem """ diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index d2e0e77c..97185af4 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -624,8 +624,6 @@ def getOnDeck(viewid, mediatype, tagname, limit): listitem = api.CreateListItemFromPlexItem( appendShowTitle=appendShowTitle, appendSxxExx=appendSxxExx) - api.AddStreamInfo(listitem) - api.set_listitem_artwork(listitem) if directpaths: url = api.getFilePath() else: @@ -815,10 +813,10 @@ def browse_plex(key=None, plex_section_id=None): albums = False musicvideos = False for item in xml: - typus = item.attrib.get('type') if item.tag == 'Directory': __build_folder(item, plex_section_id=plex_section_id) else: + typus = item.attrib.get('type') __build_item(item) if typus == v.PLEX_TYPE_PHOTO: photos = True @@ -905,11 +903,6 @@ def __build_folder(xml_element, plex_section_id=None): def __build_item(xml_element): api = API(xml_element) listitem = api.CreateListItemFromPlexItem() - try: - api.AddStreamInfo(listitem) - except: - pass - api.set_listitem_artwork(listitem) if (api.getKey().startswith('/system/services') or api.getKey().startswith('http')): params = { @@ -917,14 +910,17 @@ def __build_item(xml_element): 'key': xml_element.attrib.get('key'), 'view_offset': xml_element.attrib.get('viewOffset', '0'), } + url = "plugin://%s?%s" % (v.ADDON_ID, urlencode(params)) + elif api.getType() == v.PLEX_TYPE_PHOTO: + url = api.get_picture_path() else: params = { + 'mode': 'play', 'filename': api.getKey(), 'id': api.getRatingKey(), - 'dbid': listitem.getProperty('dbid'), - 'mode': "play" + 'dbid': listitem.getProperty('dbid') } - url = "plugin://%s?%s" % (v.ADDON_ID, urlencode(params)) + url = "plugin://%s?%s" % (v.ADDON_ID, urlencode(params)) xbmcplugin.addDirectoryItem(handle=HANDLE, url=url, listitem=listitem) diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index f8883c07..d59d98e9 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -55,8 +55,6 @@ class Playback_Starter(Thread): result = Playback_Successful() listitem = PKC_ListItem() listitem = api.CreateListItemFromPlexItem(listitem) - api.AddStreamInfo(listitem) - api.set_listitem_artwork(listitem) result.listitem = listitem else: # Video and Music From 319afd4f99994be9bf8a2054099350066bdddab5 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 12:54:29 +0100 Subject: [PATCH 25/66] Fix videos not starting from ListItems --- resources/lib/PlexAPI.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 3562f9a4..9f69b026 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -2378,7 +2378,8 @@ class API(): listItem = xbmcgui.ListItem(title) else: listItem.setLabel(title) - + # Necessary; Kodi won't start video otherwise! + listItem.setProperty('IsPlayable', 'true') # Video items, e.g. movies and episodes or clips people = self.getPeople() userdata = self.getUserData() From 6e2751a69590613425b2e9a87d550af21b896024 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 13:13:04 +0100 Subject: [PATCH 26/66] Fix TypeError for setting ListItem streams --- resources/lib/PKC_listitem.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/lib/PKC_listitem.py b/resources/lib/PKC_listitem.py index 6e16fcb9..4d9081a7 100644 --- a/resources/lib/PKC_listitem.py +++ b/resources/lib/PKC_listitem.py @@ -22,6 +22,8 @@ def convert_PKC_to_listitem(PKC_listitem): if data['info']: listitem.setInfo(**data['info']) for stream in data['stream_info']: + # Kodi documentation up to date? CAREFUL as type= seems to be cType= + # and values= seems to be dictionary= listitem.addStreamInfo(**stream) if data['art']: listitem.setArt(data['art']) @@ -90,7 +92,7 @@ class PKC_ListItem(object): - Subtitle Values: - language : string (en) """ - self.data['stream_info'].append({'type': type, 'values': values}) + self.data['stream_info'].append({'cType': type, 'dictionary': values}) def getLabel(self): """ From 9391d10d4483dbaaa3c700e04611e71c88d10c85 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 13:54:59 +0100 Subject: [PATCH 27/66] Fix playback error popup when using Alexa - Fixes #258 --- resources/lib/playback_starter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index d59d98e9..b6b14c18 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -120,6 +120,7 @@ class Playback_Starter(Thread): if result.listitem: listitem = convert_PKC_to_listitem(result.listitem) Player().play(listitem.getfilename(), listitem) + return Playback_Successful() else: return result From d6bb8064404194ebb8497e1980e3d8608dacacb4 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 14:32:01 +0100 Subject: [PATCH 28/66] Show menu item only for appropriate Kodi library --- default.py | 2 +- resources/lib/entrypoint.py | 44 +++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/default.py b/default.py index 7eee823b..311ea999 100644 --- a/default.py +++ b/default.py @@ -165,7 +165,7 @@ class Main(): entrypoint.getVideoFiles(plexId, params) else: - entrypoint.doMainListing() + entrypoint.doMainListing(content_type=params.get('content_type')) def play(self): """ diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 97185af4..9acb1279 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -116,7 +116,8 @@ def addDirectoryItem(label, path, folder=True): xbmcplugin.addDirectoryItem(handle=HANDLE, url=path, listitem=li, isFolder=folder) -def doMainListing(): +def doMainListing(content_type=None): + log.debug('Do main listing with content_type: %s' % content_type) xbmcplugin.setContent(HANDLE, 'files') # Get emby nodes from the window props plexprops = window('Plex.nodes.total') @@ -126,37 +127,38 @@ def doMainListing(): path = window('Plex.nodes.%s.index' % i) if not path: path = window('Plex.nodes.%s.content' % i) + if not path: + continue label = window('Plex.nodes.%s.title' % i) node_type = window('Plex.nodes.%s.type' % i) - #because we do not use seperate entrypoints for each content type, we need to figure out which items to show in each listing. - #for now we just only show picture nodes in the picture library video nodes in the video library and all nodes in any other window - if path and getCondVisibility("Window.IsActive(Pictures)") and node_type == "photos": + # because we do not use seperate entrypoints for each content type, + # we need to figure out which items to show in each listing. for + # now we just only show picture nodes in the picture library video + # nodes in the video library and all nodes in any other window + if node_type == 'photos' and content_type == 'image': addDirectoryItem(label, path) - elif path and getCondVisibility("Window.IsActive(VideoLibrary)") and node_type != "photos": - addDirectoryItem(label, path) - elif path and not getCondVisibility("Window.IsActive(VideoLibrary) | Window.IsActive(Pictures) | Window.IsActive(MusicLibrary)"): + elif (node_type != 'photos' and + content_type not in ('image', 'audio')): addDirectoryItem(label, path) # Plex Watch later - addDirectoryItem(lang(39211), - "plugin://plugin.video.plexkodiconnect/?mode=watchlater") + if content_type not in ('image', 'audio'): + addDirectoryItem(lang(39211), + "plugin://%s?mode=watchlater" % v.ADDON_ID) # Plex Channels addDirectoryItem(lang(30173), - "plugin://plugin.video.plexkodiconnect/?mode=channels") + "plugin://%s?mode=channels" % v.ADDON_ID) # Plex user switch addDirectoryItem(lang(39200) + window('plex_username'), - "plugin://plugin.video.plexkodiconnect/" - "?mode=switchuser") + "plugin://%s?mode=switchuser" % v.ADDON_ID) - #experimental live tv nodes - # addDirectoryItem("Live Tv Channels (experimental)", "plugin://plugin.video.plexkodiconnect/?mode=browsecontent&type=tvchannels&folderid=root") - # addDirectoryItem("Live Tv Recordings (experimental)", "plugin://plugin.video.plexkodiconnect/?mode=browsecontent&type=recordings&folderid=root") - - # some extra entries for settings and stuff. TODO --> localize the labels - addDirectoryItem(lang(39201), "plugin://plugin.video.plexkodiconnect/?mode=settings") - # addDirectoryItem("Add user to session", "plugin://plugin.video.plexkodiconnect/?mode=adduser") - addDirectoryItem(lang(39203), "plugin://plugin.video.plexkodiconnect/?mode=refreshplaylist") - addDirectoryItem(lang(39204), "plugin://plugin.video.plexkodiconnect/?mode=manualsync") + # some extra entries for settings and stuff + addDirectoryItem(lang(39201), + "plugin://%s?mode=settings" % v.ADDON_ID) + addDirectoryItem(lang(39203), + "plugin://%s?mode=refreshplaylist" % v.ADDON_ID) + addDirectoryItem(lang(39204), + "plugin://%s?mode=manualsync" % v.ADDON_ID) xbmcplugin.endOfDirectory(HANDLE) From 94aaf9a43d259ee23251a63dbf698af38d73ab8d Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 14:42:39 +0100 Subject: [PATCH 29/66] Version bump --- addon.xml | 2 +- changelog.txt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 46d9fc40..d8f0f4d7 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 016ba49a..a3c36ba9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,11 @@ +version 1.7.4 (beta only) +- Show menu item only for appropriate Kodi library: Be careful to start video content through Videos -> Video Addons -> ... and pictures through Pictures -> Picture Addons -> ... +- Fix playback error popup when using Alexa +- Rewire Kodi ListItem stuff +- Fix TypeError for setting ListItem streams +- Fix Kodi setContent for images +- Fix AttributeError due to missing Kodi sort methods + version 1.7.3 (beta only) - Fix KeyError for channels if no media streams - Move plex node navigation, playback to main thread From bf563ce2e3496ec212fc5d6ea6d08cb8a6bef04c Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 14:44:46 +0100 Subject: [PATCH 30/66] Update Danish translation --- resources/language/Danish/strings.xml | 41 ++++++++++++++------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/resources/language/Danish/strings.xml b/resources/language/Danish/strings.xml index 0342a57c..8056d3d6 100644 --- a/resources/language/Danish/strings.xml +++ b/resources/language/Danish/strings.xml @@ -87,7 +87,7 @@ Mark som set Mark som ikke set Føj til favoritter - Fjern fra Favoritter + Fjern fra favoritter Sorter efter... Sorter faldende Sorter stigende @@ -99,7 +99,7 @@ Start fra begyndelsen Interface - Inkludere Stream Info + Inkludere stream info Inkludere mennesker Inkludere oversigt Tilbud sletning efter afspilning @@ -135,7 +135,7 @@ Skin understøtter ikke visning indstillinger Vælg handling (kræver genstart) - Sorter NextUp efter titel visning + Sorter efter titel visning Aktiver forbedret billeder (fx CoverArt) Metadata Illustrationer @@ -174,12 +174,12 @@ Billeder Usete film Film genrer - Film Studios + Film studios Skuespillere Usete episoder TV genrer - TV Netværk - TV Skuespillere + TV netværk + TV skuespillere Afspilningsliste Søg Visning @@ -206,11 +206,11 @@ Komprimere billeder Nyeste Igangværende - NextUp + Næste Visning Tekstmålinger Brug Kodi sortering - Spiltid + Spilletid Tilfældig Seneste udgivelse @@ -225,7 +225,7 @@ [COLOR yellow] Nulstille lokale Kodi database[/COLOR] Vælg Set / Genoptag status sync DB Sync angivelse: - Afspil Sync angivelse: + Afspil sync angivelse: Aktivere HTTPS Vælg Transcoding Codecs @@ -238,7 +238,7 @@ Senest tilføjet billeder Favorit hjemmevideoer Favorit fotos - Favorit Albums + Favorit albums Senest tilføjet musik videoer Igangværende musikvideoer @@ -254,14 +254,14 @@ Sæson Episoder Musik kunstnere - Musik Albums + Musik albums Musikvideoer Musiknumre Kanaler Plex indstillinger - Slet Like for dette emne + Slet like for dette emne Like dette emne Dislike dette emne Tilføj til Plex favoritter @@ -346,7 +346,7 @@ Indsamling film fra: Indsamling boxsets Indsamling musikvideoer fra: - Indsamling TV Shows fra: + Indsamling TV shows fra: Indsamling: Registreret database skal genskabes i denne version af Emby for Kodi. Vil du fortsætte? Emby for Kodi fungerer muligvis ikke korrekt, før databasen er nulstillet. @@ -355,7 +355,7 @@ Sammenligne film fra: Sammenligne boxsets Sammenligne musikvideoer fra: - Sammenligne TV Shows fra: + Sammenligne TV shows fra: Sammenligne episoder fra: Sammenligne: Det lykkedes ikke at generere en nyt enheds Id. Se dine logfiler for flere oplysninger. @@ -406,14 +406,14 @@ Erstatte Plex film med: Oprindelige Plex TV shows sti erstattes: Erstatte Plex TV SHOWS med: - Oprindelige Plex Musik sti erstattes: + Oprindelige Plex musik sti erstattes: Erstatte Plex musik med: Gå et skridt videre og erstat alle oprindelige Plex bibliotek stier (/ volume1/media) med brugerdefinerede SMB-stier (smb://NAS/MyStuff)? Indtast venligst din brugerdefinerede smb stier i indstillingerne under "synkroniseringsindstillinger" og derefter genstarte Kodi Oprindelige Plex Foto sti erstattes: Erstatte Plex foto med: - Senest Tilføjet: Vis titel til episode - Senest Tilføjet: Føj sæson - og episode-nummer SxxExx + Senest tilføjet: Vis titel til episode + Senest tilføjet: Føj sæson - og episode-nummer SxxExx Intet virker? Prøv en fuld reset! [COLOR yellow] Vælg Plex Server fra listen[/COLOR] Vente før sync af nye/ændrede PMS element [s] @@ -425,7 +425,7 @@ Tilpasse stier Udvide Plex TV serie "Senest Tilføjet" Til vis alle shows Senest tilføjet: Føj Vis titel til episode - Senest Tilføjet: Føj sæson - og episode-nummer SxxExx + Senest tilføjet: Føj sæson - og episode-nummer SxxExx Ønsker du at downloade ekstra illustrationer fra FanArtTV i baggrunden? Sync når screensaver er deaktiveret Transcode Hi10P @@ -514,6 +514,7 @@ Fjern alle cachelagrede illustrationer? (anbefales!) Nulstil alle indstillinger for PlexKodiConnect Addon? (dette er normalt ikke anbefalet og unødvendigt!) - Amazon Alexa (Voice Recognition) - Alexa aktivieren + Amazon Alexa (Stemme genkendelse) + Aktivere Alexa + Søg via mappe \ No newline at end of file From 1d84aa221c4a52d5e52d01f698f979a7c9746309 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 14:45:56 +0100 Subject: [PATCH 31/66] New Dutch translation --- resources/language/Dutch/strings.xml | 520 +++++++++++++++++++++++++++ 1 file changed, 520 insertions(+) create mode 100644 resources/language/Dutch/strings.xml diff --git a/resources/language/Dutch/strings.xml b/resources/language/Dutch/strings.xml new file mode 100644 index 00000000..98f3d1a3 --- /dev/null +++ b/resources/language/Dutch/strings.xml @@ -0,0 +1,520 @@ + + + + PlexKodiConnect + Serveradres (IP) + Voorkeurs methode voor afspelen + Logniveau + Gebruikersnaam: + Wachtwoord: + Netwerk gebruikersnaam: + Netwerk wachtwoord: + Transcode: + Schakel Performance Profiling in + Lokaal caching systeem + OK + Nooit weergeven + + Verbinding + Netwerk + Apparaatnaam + Onbevoegd voor PMS + + Geavanceerd + Gebruikersnaam + + Bericht weergeven als PMS offline gaat + + Poortnummer + Dit is mijn Plex Media Server + Aantal recente films tonen: + Aantal recente TV-afleveringen tonen: + Aantal recente muziekalbums tonen: + Markeer als gezien aan begin van afspelen: + Toon poster van seizoen bij afleveringen + + Genre Filter... + Speel alles vanaf hier + Vernieuwen + Verwijderen + Film toevoegen aan CouchPotato + + Onjuiste gebruikersnaam/wachtwoord + Gebruikersnaam niet gevonden + + Verwijderen + Wachten op het verwijderen op de server + + Standaardwaarde van de server + Titel + Jaar + Datum Première + Datum gemaakt + Critic Rating + Community Rating + Afspeel aantal + Budget + + + Sorteren op + + Geen + Actie + Avontuur + Animatie + Misdaad + Komedie + Documentaire + Drama + Fantasie + Buitenlandse + Geschiedenis + Horror + Muziek + Musical + Mysterie + Romantiek + Sciencefiction + Kort + Spanning + Thriller + Western + + Genre Filter + Bevestig bestandsverwijdering + Dit item verwijderen? Deze actie verwijderd media en bijbehorende gegevensbestanden. + + Markeer als bekeken + Markeer als niet bekeken + Toevoegen aan Favorieten + Verwijderen uit favorieten + Sorteren op... + Aflopende sorteervolgorde + Oplopende sorteervolgorde + Toon personen + + + Hervatten + Hervatten vanaf + Starten vanaf het begin + + Uiterlijk + Info van de Stream opnemen + Mensen opnemen + Overzicht opnemen + Aanbieding verwijderen na het afspelen + Voor Afleveringen + Voor films + Achtergrond kunst vernieuwingsfrequentie (seconden) + Hervatten percentage toevoegen + Aflevering nummer toevoegen + De voortgang van het laden tonen + Laden van inhoud + Gegevens ophalen + Gedaan + Verwerking van Item: + Fout bij afspelen + Dit object is niet afspeelbaar + Lokaal pad gedetecteerd + Uw MB3-Server bevat lokale paden. Wijzig de server paden naar UNC- of wijzig de XBMB3C instelling 'Play uit Stream' naar true. Path: + Waarschuwing + Debug logging geactiveerd. + Dit zal invloed hebben op de prestaties. + Fout + Bewakingsservice draait niet + Als je net geïnstalleerd hebt, start Kodi opnieuw + Zoek + + Inschakelen themamuziek (opnieuw opstarten noodzakelijk) + - themamuziek herhalen + Achtergrondafbeelding inschakelen (opnieuw opstarten noodzakelijk) + Diensten + + Altijd transcoden als video bitrate hoger is dan + + Instelling weergaven worden niet ondersteund door thema + Selecteer de item-actie (vereist opnieuw opstarten) + + Soort NextUp op Serie titel + Verbeterde afbeeldingen (bijvoorbeeld CoverArt) inschakelen + Metagegevens + Illustraties + Videokwaliteit als Transcoden nodig is + + Inschakelen van de voorgestelde Loader (opnieuw opstarten noodzakelijk) + Seizoen nummer toevoegen + Seizoenen samenvoegen + + Direct Play - HTTP + Direct Play + Transcoden + Serverdetectie geslaagd + Server gevonden + Adres: + + + Onlangs toegevoegde TV-Shows + Actieve TV-Shows + Alle muziek + Kanalen + Onlangs toegevoegd + Onlangs toegevoegde afleveringen + Onlangs toegevoegde Albums + Actieve Films + Actieve afleveringen + Komende afleveringen + Favoriete films + Favoriete tv-series + Favoriete afleveringen + Frequent afgespeelde Albums + Aankomende TV + BoxSets + Trailers + Muziekvideo 's + Foto 's + Onbekeken films + Film Genres + Filmstudios + Film acteurs + Onbekeken afleveringen + TV Genres + TV-netwerken + TV-acteurs + Afspeellijsten + Zoek + Set Views + + Selecteer gebruiker + Profiling ingeschakeld. + Vergeet niet uit te schakelen als u klaar bent met testen. + Fout in ArtworkRotationThread + Kan geen verbinding maken met de server + Fout in LoadMenuOptionsThread + + Inschakelen van Playlists Loader (opnieuw opstarten noodzakelijk) + + Nummers + Albums + Album Artiesten + Artiesten + Muziekgenres + + Thema video's inschakelen (opnieuw opstarten noodzakelijk) + - Thema video's herhalen + + Speel automatisch resterende afleveringen in een seizoen + Comprimeren van Artwork + Nieuwste + Actief + NextUp + Gebruiker Views + Rapporteer statistieken + Gebruik sortering van Kodi + Speelduur + + Willekeurig + Onlangs ge-released + Willekeurige Items + Aanbevolen + + Extra 's + Synchroniseer themamuziek + Synchroniseer extra Fanart + Synchroniseer Film BoxSets + + [COLOR yellow]Reset lokale Kodi database[/COLOR] + Activeer kijk/status synchronisatie + DB Sync indicatie: + Afspeelaantal Sync Indicatie: + HTTPS inschakelen + Forceer Codecs Transcoden + + Inschakelen van Netflix stijl volgende notificatie + - Het aantal seconden voor het einde waneer de notificatie te tonen + Toon Emby Infodialoog bij Afspelen/Selecteer actie + Inschakelen van server verbinding bericht bij het opstarten + + Recent toegevoegde Thuis-video 's + Recent toegevoegde foto's + Favoriete Thuis-Video's + Favoriete foto 's + Favoriete Albums + + Recent toegevoegde videoclips + Actieve videoclips + Onbekeken videoclips + + + Actieve + Instellingen wissen + Films + BoxSets + Trailers + TV-series + Seizoenen + Afleveringen + Muziek artiesten + Muziekalbums + Muziekvideo 's + Muziektracks + Kanalen + + + Plex opties + Verwijder like voor dit item + Like dit item + Dislike dit item + Voeg toe aan Plex favorieten + Verwijderen uit Plex favorieten + Aangepaste song beoordeling instellen + Plex addon instellingen + Verwijderen item van server + Vernieuwen van dit item + Aangepaste rating instellen (0-5) + Forceer transcoden + Inschakelen van Plex contextmenu in Kodi + Kon het item niet verwijderen van Plex. Is het verwijderen van items ingeschakeld op de Plex Media Server? + Het afspelen starten via PMS + Instellingen voor de Plex Server + + + Controleer het Host SSL-certificaat (veiliger) + SSL-clientcertificaat + Gebruik alternatief adres + Alternatief server adres + Gebruik alternatieve apparaat naam + [COLOR yellow]Reset inlog pogingen[/COLOR] + Synchronisatieopties + Synchroniseren voortgang weergeven + Sync lege TV Shows + Muziekbibliotheek inschakelen + Direct stream muziekbibliotheek + Afspeelmodus + Forceer artwork caching + Beperk artwork cache threads (aanbevolen voor rpi) + Snel opstarten inschakelen (server plugin vereist) + Maximaal aantal items om per request van de server op te halen + Afspelen + [COLOR yellow]Geef netwerk authenticatie gegevens[/COLOR] + Inschakelen van Plex Trailers (Plexpass is nodig) + Vragen om trailers te tonen + Geen confirmatie bij het verwijderen van Plex (gebruik op eigen risico) + Terugspringen bij verder kijken (in seconden) + Forceer transcoden h265/HEVC + Muzie metagegevens opties (niet compatible met direct stream) + Muziek ratings direct uit bestanden lezen + Converteer muziek ratings naar Emby ratings + Toestaan van aanpassen rating in bestanden + Specials in de volgende afleveringen negeren + Permanente gebruikers toe te voegen aan de sessie + Opstartvertraging (in seconden) + Server herstart bericht inschakelen + Schakel kennisgeving in nieuwe inhoud + Duur van de bibliotheek popup (in seconden) + Duur van de bibliotheek popup (in seconden) + Serverberichten + [COLOR yellow]Genereer nieuw uniek apparaat id (bijvoorbeeld bij het klonen van Kodi)[/COLOR] + Gebruiker moet bij elke Kodi herstart opnieuw inloggen + BIJ AANPASSINGEN KODI HERSTARTEN + Volledige re-sync nodig + Download extra artwork van FanArtTV + Download film set/collectie artwork van FanArtTV + Niet vragen om een bepaalde stream/kwaliteit te kiezen + Kies altijd beste kwaliteit voor trailers + Kodi draait op een low-power apparaat (bijvoorbeeld Raspberry Pi) + Artwork + Forceer transcoden van foto's + + + Welkom + Verbindingsfout + Server is onbereikbaar + Server is online + items toegevoegd aan playlist + items toegevoegd aan playlist + De server wordt opnieuw opgestart + Toegang is verleend + Wachtwoord voor gebruiker: + Ongeldige gebruikersnaam of wachtwoord + Te vaak niet kunnen inloggen. Pas instellingen aan. + Direct play niet mogelijk + Direct play 3 keer mislukt. Afspelen via HTTP ingeschakeld. + Kies het audio kanaal + Kies de ondertitels + Verwijder bestand van uw Emby server? + Trailers afspelen? + Verzamel films van: + Verzamel boxsets + Verzamel muziek video's van: + Verzamel tv-shows van: + Verzamelen: + Detected the database needs to be recreated for this version of Emby for Kodi. Proceed? + Emby for Kodi may not work correctly until the database is reset. + Database sync geannuleerd. De huidige versie van Kodi is niet ondersteund. + voltooid in: + Vergelijk films met: + Vergelijken boxsets + Vergelijk muziek video's met: + Vergelijk tv-shows met: + Vergelijk afleveringen met: + Vergelijken: + Genereren van nieuwe device id mislukt. Zie de logs voor meer informatie. + Kodi zal nu opnieuw opstarten om de wijzigingen toe te passen. + Bestand(en) van Plex Server verwijderen? Dit zal ook de bestanden van de schijf verwijderen! + + + - Aantal trailers voor een film afspelen + Volume ophogen bij transcoden + Ondertitel grootte + Beperk aantal download threads (voor rpi: 1) + Plex Companion inschakelen (herstart kodi!) + Plex Companion poort (alleen aanpassen indien nodig) + Activeer debug log voor Plex Companion + Activeer debug log voor Plex Companion GDM + Plex Companion: Ondersteun afspelen van media via Kodi met Plex + Kan niet inloggen op plex.tv. Probeer opnieuw. + Problemen bij het verbinding met plex.tv. Netwerk of internet probleem? + Kon geen Plex servers in het netwerk vinden. Afgebroken... + Kies uw Plex server + Nog niet ingelogd op de Plex server + Log in op plex.tv. + Problemen bij het verbinden met de server. Kies een andere server? + Plex muziek library uitzetten? (Het is sterk aangeraden om Plex muziek alleen met directe paden te gebruiken bij een grote library. Kodie kan anders vastlopen) + PKC plugin instellingen aanpassen? Kodi moet hierna herstart worden! + + [COLOR yellow]Lokale database herstellen (forceer verversen van alle inhoud)[/COLOR] + [COLOR red]Gedeeltelijke of volledige reset van database en PKC[/COLOR] + [COLOR yellow]Alle afbeeldingen van Kodi nu aan de cache toevoegen[/COLOR] + [COLOR yellow]Sync Emby Theme Media to Kodi[/COLOR] + lokaal + Authenticatie mislukt. Ingelogd bij plex.tv? + + + Automatisch inloggen op plex.tv bij het opstarten + Constante achtergrond sync inschakelen + Afspeelmodus + LET OP! Als u "Native" modus kiest, zullen sommige Plex mogelijkheden niet beschikbaar zijn. Bijvoorbeeld: Plex trailers en opties voor transcoden. ALLE Plex shares moeten gebruik maken van directe paden (bijvoorbeeld smb://myNAS/mymovie.mkv of \\myNAS/mymovie.mkv)! + Netwerk gegevens + Netwerk gegevens toevoegen zodat Kodi bij de inhoud kan? Opmerking: Kodi zal een bericht tonen bij de eerste sync als deze stap overgeslagen word. + Kodi kan het bestand niet vinden: + Controleer het pad. Waarschijnlijk verkeerde netwerk gegevens of verkeerde paden. Stop synchroniseren? + Vervang Plex UNC pad \\myNas\mymovie.mkv automatisch met smb paden, smb://myNas/mymovie.mkv? (aanbevolen) + Vervang Plex UNC paden \\myNas met smb://myNas + + Vervang Plex paden /volume1/media of \\myserver\media met SMB paden smb://NAS/mystuff + Oorspronkelijke Plex film pad om te vervangen: + Vervang Plex MOVIE met: + Vervang Plex TV SHOWS pad met: + Vervang Plex TV-SHOWS met: + Oorspronkelijke Plex muziek pad om te vervangen: + Vervang Plex MUZIEK met: + Een stap verder gaan en alle oorspronkelijke Plex bibliotheek paden (/ volume1/media) volledig vervangen door aangepaste SMB paden (smb://NAS/MyStuff)? + Voer uw aangepaste smb paden in de instellingen onder "Sync Opties" en herstart Kodi + Oorspronkelijke Plex foto pad om te vervangen: + Vervang Plex PHOTO met: + On Deck: Append show title to episode + On Deck: Append season- and episode-number SxxExx + Nothing works? Try a full reset! + [COLOR yellow]Choose Plex Server from a list[/COLOR] + Wait before sync new/changed PMS item [s] + Background Sync + Do a full library sync every x minutes + remote + Searching for Plex Server + Used by Sync and when attempting to Direct Play + Customize Paths + Extend Plex TV Series "On Deck" view to all shows + Recently Added: Append show title to episode + Recently Added: Append season- and episode-number SxxExx + Would you like to download additional artwork from FanArtTV in the background? + Sync when screensaver is deactivated + Force Transcode Hi10P + Recently Added: Also show already watched episodes + Recently Added: Also show already watched movies (Refresh Plex playlist/nodes!) + Your current Plex Media Server: + [COLOR yellow]Manually enter Plex Media Server address[/COLOR] + Current address: + Current port: + Current plex.tv status: + Is your Kodi installed on a low-powered device like a Raspberry Pi? If yes, then we will reduce the strain on Kodi to prevent it from crashing. + Appearance Tweaks + TV Shows + Always use default Plex subtitle if possible + 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 + Number of PMS items to show in widgets (e.g. "On Deck") + Plex Companion Update Port (change only if needed) + Plex Companion could not open the GDM port. Please change it in the PKC settings. + + + Log-out Plex Home User + Settings + Network credentials + Refresh Plex playlists/nodes + Perform manual library sync + Unable to run the sync, the add-on is not connected to a Plex server. + Plex might lock your account if you fail to log in too many times. Proceed anyway? + Resetting PMS connections, please wait + Failed to reset PKC. Try to restart Kodi. + [COLOR yellow]Toggle plex.tv login (sign in or sign out)[/COLOR] + Not yet connected to Plex Server + Watch later + is offline + Even though we signed in to plex.tv, we could not authorize for PMS + Enter your Plex Media Server's IP or URL, Examples are: + + Does your Plex Media Server support SSL connections? (https instead of http)? + Error contacting PMS + Abort (Yes) or save address anyway (No)? + connected + plex.tv toggle successful + [COLOR yellow]Look for missing fanart on FanartTV now[/COLOR] + Only look for missing fanart or refresh all fanart? The scan will take quite a while and happen in the background. + Refresh all + Missing only + + + + Running the image cache process can take some time. It will happen in the background. Are you sure you want continue? + Reset all existing cache data first? + + + : Enter plex.tv username. Or nothing to cancel. + Enter password for plex.tv user + Could not sign in user + Problems trying to contact plex.tv. Try again later + Go to https://plex.tv/pin and enter the code: + Could not sign in to plex.tv. Try again later + : Select User + Enter PIN for user + Could not log in user + Please try again. + unknown + or press No to not sign in. + + + Library sync thread has crashed. You should restart Kodi now. Please report this on the forum + Detected Kodi database needs to be recreated for this version. This might take a while. Proceed? + may not work correctly until the database is reset. + Database syncing proces geannuleerd. Huidige Kodi versie wordt niet ondersteund. Controleer uw logbestanden voor meer info. + Startup syncing process failed repeatedly. Try restarting Kodi. Stopping Sync for now. + Plex playlists/nodes refreshed + Plex playlists/nodes refresh failed + Full library sync finished + Sync diende een aantal bestanden over te slaan. Kodi werkt misschien niet langer stabiel. Gelieve uw Kodi log bestanden op het Plex forum te posten. + The Plex Server did not like you asking for so much data at once and returned ERRORS. Try lowering the number of sync download threads in the settings. Skipped some items for now. + ERROR in library sync + + + On Deck + Collections + + + Are you sure you want to reset your local Kodi database? A re-sync of the Plex data will take time afterwards. + Could not stop the database from running. Please try again later. + Verwijder artwork cache? (aanbevolen!) + Reset alle instellingen van de PlexKodiConnect Addon? (dit is gewoonlijk niet aanbevolen en onnodig!) + + Amazon Alexa (spraakherkenning) + Aktiveer Alexa + Browse by folder + \ No newline at end of file From 014688930f7306c4fb217c3e1d5e740987cdd21d Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 14:46:44 +0100 Subject: [PATCH 32/66] Update Italian translation --- resources/language/Italian/strings.xml | 520 +++++++++++++++++++++++++ 1 file changed, 520 insertions(+) create mode 100644 resources/language/Italian/strings.xml diff --git a/resources/language/Italian/strings.xml b/resources/language/Italian/strings.xml new file mode 100644 index 00000000..e6e0119d --- /dev/null +++ b/resources/language/Italian/strings.xml @@ -0,0 +1,520 @@ + + + + PlexKodiConnect + Indirizzo Server (IP) + Metodo di riproduzione preferito + Livello di log + Username: + Password: + Username rete: + Password rete: + Transcodifica: + Abilita analisi performance + Sistema di caching locale + OK + Non mostrare mai + + Connessione + Rete + Nome del dispositivo + Non autorizzato per PMS + + Avanzate + Username + + Mostra un messaggio se PMS va offline + + Porta + Possiedo questo Plex Media Server + Numero di Film recenti da mostrare: + Numero di Episodi TV recenti da mostrare: + Numero di Album Musicali recenti da mostrare: + Segna come visto all'inizio della riproduzione: + Imposta il poster della Stagione per gli episodi + + Filtro genere ... + Riproduci tutto da qui + Aggiorna + Elimina + Aggiungi il Film a CouchPotato + + Username o Password non corretti + Username non trovato + + Sto eliminando + In attesa del server per l'eliminazione + + Impostazione predefinita del server + Titolo + Anno + Data di uscita + Data creazione + Valutazione critica + Valutazione pubblico + Numero riproduzioni + Budget + + + Ordina per + + Nessuno + Azione + Avventura + Animazione + Giallo + Commedia + Documentario + Drammatico + Fantasy + Straniero + Storico + Horror + Musica + Musical + Mistero + Romantico + Fantascienza + Corto + Suspense + Thriller + Western + + Filtro genere + Confema eliminazione + Eliminare questo elemento? Questa azione eliminerà il media e i file associati. + + Segna come Visto + Segna come Non Visto + Aggiungi ai Preferiti + Rimuovi dai Preferiti + Ordina per ... + Ordinamento decrescente + Ordinamento crescente + Mostra Persone + + + Riprendi + Riprendi da + Parti dall'inizio + + Interfaccia + Includi informazioni sullo Stream + Includi Persone + Includi Panoramica + Chiedi se eliminare dopo la riproduzione + Per Episodi + Per Film + Frequenza di aggiornamento dello sfondo (secondi) + Aggiungi percentuale riproduzione + Aggiungi numero Episodio + Mostra progresso caricamento + Caricamento contenuti + Recupero dati + Completato + Elaborazione elemento : + Errore riproduzione + Questo elemento non è riproducibile + Rilevato percorso locale + Il tuo server MB3 contiene percorsi locali. Si prega di cambiare i percorsi del server a UNC o abilitare l'impostazione XBMB3C 'Riproduci dallo Stream'. Percorso: + Avviso + Debugging abilitato. + Questo influirà sulle prestazioni. + Errore + Il servizio di monitoraggio non è in esecuzione + Si prega di riavviare Kodi se l'installazione è appena terminata + Cerca + + Abilita Musica Tema (Richiede riavvio) + - Riproduzione continua musica del tema + Abilita immagine di sfondo (Richiede riavvio) + Servizi + + Transcodifica sempre se il bitrate è sopra + + La skin non supporta l'impostazione delle viste + Seleziona l'azione dell'elemento (Richiede riavvio) + + Ordina i prossimi per il titolo della Serie + Abilita immagini migliorate (es Copertine) + Metadati + Artwork + Qualità Video se la Transcodifica è necessaria + + Abilita il loader consigliato (Richiede riavvio) + Aggiungi il numero della Stagione + Appiattire le stagioni + + Riproduzione diretta - HTTP + Riproduzione diretta + Transcodifica + Server rilevato con successo + Server trovato + Indirizzo : + + + Spettacoli aggiunti recentemente + Spettacoli in corso + Tutta la Musica + Canali + Aggiunti di recente + Episodi aggiunti di recente + Album aggiunti di recente + Film in corso + Episodi in corso + Prossimi Episodi + Film preferiti + Spettacoli preferiti + Episodi preferiti + Album riprodotti di frequente + TV in arrivo + Cofanetti + Trailer + Video musicali + Foto + Film Non Visti + Generi Film + Studi cinematografici + Attori Film + Episodi Non Visti + Generi TV + Reti TV + Attori TV + Playlist + Cerca + Imposta viste + + Seleziona Utente + Analisi abilitata. + Ricorda di spegnere una volta completato il testing. + Errore in ArtworkRotationThread + Impossibile connettersi al server + Errore in LoadMenuOptionsThread + + Abilita caricamento Playlist (Richiede riavvio) + + Canzoni + Album + Artisti Album + Artisti + Generi Musicali + + Abilita video del tema (Richiede riavvio) + - Riproduzione continua dei video del tema + + Riproduci automaticamente episodi della stagione + Comprimi Artwork + Recenti + In corso + Prossimi + Viste utente + Dati utilizzo + Utilizza ordinamento Kodi + Tempo esecuzione + + Casuale + Usciti di recente + Elementi casuali + Consigliati + + Extra + Sincronizza Sigla Musicale + Sincronizza Fanart Extra + Sincronizza Cofanetti Film + + [COLOR yellow]Resetta il database locale di Kodi[/COLOR] + Abilita sincronizzazione stato Film (visto/riprendi) + Indicazione Sincronizzazione DB: + Indicazione sincronizzazione conteggio riproduzioni: + Abilita HTTPS + Forza transcodifica codec + + Abilita notifiche in stile Netflix + - Il numero di secondi prima della fine per mostrare la notifica + Mostra il dialogo informativo di Emby nell'azione riproduci/seleziona + Abilita il messaggio di connessione al server all'avvio + + Video aggiunti di recente + Foto aggiunte di recente + Video preferiti + Foto preferite + Album preferiti + + Video Musicali aggiuni di recente + Video Musicali in corso + Video Musicali Non Visti + + + Attiva + Ripristina Impostazioni + Film + Cofanetti + Trailer + Serie TV + Stagioni + Episodi + Artisti Musicali + Album Musicali + Video Musicali + Tracce Musicali + Canali + + + Opzioni di Plex + Elimina i Mi Piace per questo elemento + Mi Piace questo elemento + Non Mi Piace questo elemento + Aggiungi ai Preferiti di Plex + Rimuovi dai Preferiti di Plex + Imposta valutazione della canzone + Impostazioni addon Plex + Elimina elemento dal server + Aggiorna questo elemento + Imposta valutazione della canzone (0-5) + Forza transcodifica + Abilita menù contestuale di Plex in Kodi + Non riesco a cancellare l'elemento di Plex. La cancellazione degli elementi è abilitata sul PMS? + Inizia riproduzione via PMS + Impostazioni del server Plex + + + Verifica il certificato SSL dell'host (più sicuro) + Certificato SSL del client + Usa un indirizzo alternativo + Indirizzo server alternativo + Usa un nome dispositivo alternativo + [COLOR yellow]Resetta i tentativi di login[/COLOR] + Opzioni di sincronizzazione + Mostra stato sincronizzazione + Sincronizza Serie TV vuote + Abilita Libreria Musicale + Riproduzione diretta Libreria Musicale + Modalità di riproduzione + Forza caching delle artwork + Limita numero thread di caching delle artwork (raccomandato per rpi) + Abilita avvio veloce (richiede plugin sul server) + Numero massimo di elementi da richiedere in una volta al server + Riproduzione + [COLOR yellow]Inserisci credenziali di rete[/COLOR] + Abilita trailer Plex (richiede PlexPass) + Richiedi di riprodurre trailer + Salta richiesta di conferma cancellazione per il menu contestuale (utilizzare a proprio rischio) + Anticipo su riprendi riproduzione (in secondi) + Forza transcodifica h265/HEVC + Opzioni metadati Musica (non compatibile con la riproduzione diretta) + Importa valutazioni canzoni direttamente dai file + Converti le valutazioni delle canzoni nelle valutazioni di Emby + Consenti aggiornamento valutazioni nei file della canzoni + Ignora gli speciali in Prossimo Episodio + Utenti permanenti da aggiungere alla sessione + Ritardo avvio (in secondi) + Abilita messaggio di restart del server + Abilita notifica nuovi contenuti + Durata del pop up della libreria video (in secondi) + Durata del pop up della libreria musicale (in secondi) + Messaggi del server + [COLOR yellow]Genera un nuovo ID dispositivo (es. quando viene clonato Kodi)[/COLOR] + Gli utenti devono fare login ogni volta che viene avviato Kodi + RIAVVIA KODI SE FAI DELLE MODIFICHE + Ri-sincronizzazione completa necessaria + Scarica immagini aggiuntive da FanartTV + Scarica collezioni/cofanetti film da FanartTV + Non chiedere di scegliere la qualità dello stream + Scegli sempre qualità migliore per i trailer + Kodi in esecuzione su un dispositivo poco potente (es Raspberry Pi) + Artwork + Forza transcodifica immagini + + + Benvenuto + Errore di connessione + Il server è irraggiungibile + Il server è online + elementi aggiunti alla playlist + elementi in coda alla playlist + Il server si sta riavviando + L'accesso è abilitato + Inserisci la password per l'utente: + Username o password non validi + Autenticazione fallita per troppe volte. Effettua un reset nelle impostazioni. + Impossibile avviare riproduzione diretta + Riproduzione diretta fallita per 3 volte. Abilitata riproduzione da HTTP. + Scegli l'audio + Scegli i sottotitoli + Cancella il file dal server Emby? + Riproduci trailer? + Ottenimento Film da: + Ottenimento Cofanetti + Ottenimento Video Musicali da: + Ottenimento Serie TV da: + Ottenimento: + Il database deve essere ricreato per questa versione di Emby per Kodi. Procedere? + Emby per Kodi potrebbe non funzionare correttamente finché non viene resettato il database. + Annullamento della sincronizzazione del database. La versione corrente di Kodi non è supportata. + completato in: + Confronto Film da: + Confronto Cofanetti + Confronto Video Musicali da: + Confronto Serie TV da: + Confronto Episodi da: + Confronto: + Generazione nuovo ID dispositivo fallita. Controlla il log per maggiori informazioni. + Kodi sarà riavviato per applicare le modifiche. + Cancellare i/il file dal server Plex? Questo cancellerà i/il file dal disco! + + + - Numero di trailer da riprodurre prima di un film + Aumenta audio durante la transcodifica + Dimensione sottotitoli in sovraimpressione + Limita thread di download per la sincronizzazione (racc. per rpi: 1) + Abilita Plex Companion (riavvia Kodi!) + Porta Plex Companion (cambia solo se necessario) + Attiva debug log di Plex Companion + Attiva GDM debug log di Plex Companion + Plex Companion: permetti l'esecuzione di file multimediali mediante Plex + Impossibile effettuare il login su plex.tv. Si prega di provare ad accedere nuovamente. + Problema di connessione a plex.tv. Problemi di rete o di internet? + Non riesco a trovare un server Plex nella rete. Annullamento... + Scegli il tuo server Plex + Ancora non autorizzato ad accedere al server Plex + Si prega di accedere a plex.tv. + Problemi di connessione al server. Scegliere un altro server? + Disabilita libreria musicale di Plex? (Per grandi librerie musicali, è VIVAMENTE raccomandato di usare Plex music solo con i percorsi diretti. Altrimenti Kodi potrebbe crashare) + Vuoi andare nelle impostazioni del plugin per modificare i settaggi di PKC? Avrai bisogno di RIAVVIARE Kodi! + + [COLOR yellow]Ripara database locale (forza l'aggiornamento dei contenuti)[/COLOR] + [COLOR red]Reset parziale o completo di database e PKC[/COLOR] + [COLOR yelow]Sposta tutte le immagini nella cache delle texture di Kodi[/COLOR] + [COLOR yellow]Sincronizza il tema di Emby su Kodi[/COLOR] + locale + Autenticazione fallita. Hai fatto il login su plex.tv? + + + Accedi automaticamente a plex.tv all'avvio + Abilita sincronizzazione continua in background + Modalità di riproduzione + ATTENZIONE! Se scegli la modalità "Nativa", potresti perdere alcune funzionalità di Plex, come i trailer Plex e le opzioni di transcodifica. TUTTE le condivisioni di Plex devono utilizzare i percorsi diretti (es. smb://mioNAS/mioFilm.mkv o \\mioNAS/mioFilm.mkv)! + Credenziali di rete + Aggiungi le credenziali di rete per consentire a Kodi di leggere i tuoi contenuti? Nota: Se si salta questo passaggio potrebbe essere mostrato un messaggio durante la scansione iniziale, se Kodi non riesce a trovare i tuoi contenuti. + Kodi non riesce a trovare il file: + Si prega di verificare il percorso. Potrebbe essere necessario verificare le tue credenziali di rete nelle impostazioni dell'addon o utilizzare dei percorsi Plex differenti. Interrompere la sincronizzazione? + Trasformare i percorsi UNC della libreria Plex \\NAS\media in percorsi SMB smb://NAS/media automaticamente? (raccomandato) + Sostituisci i percorsi UNC di Plex \\NAS con smb://NAS + + Sostituisci i percorsi Plex /volume1/media o \\NAS\media con dei percorsi SMB smb://NAS/media + Percorso FILM Plex originale da sostituire: + Sostituisci FILM Plex con: + Percorso SPETTACOLI Plex originale da sostituire: + Sostituisci SPETTACOLI Plex con: + Percorso MUSICA Plex originale da sostituire: + Sostituisci MUSICA Plex con: + Fare un ulteriore passaggio e sostituire completamente tutti i percorsi originali della libreria Plex (/volume1/media) con percorsi SMB (smb://NAS/media)? + Si prega di inserire i percorsi SMB personalizzati nelle impostazioni sotto "Opzioni di Sincronizzazione" e poi riavviare Kodi + Percorso FOTO Plex originale da sostituire: + Sostituisci FOTO Plex con: + On Deck: Aggiungere il titolo della serie all'episodio + On Deck: Aggiungere il numero della stagione e dell'episodio (SxxExx) + Non funziona nulla? Prova un reset completo! + [COLOR yellow]Scegli un server Plex[/COLOR] + Attesa prima della sincronizzazione di elementi nuovi/modificati in PMS [s] + Sincronizzazione in background + Esegui una sincronizzazione completa della libreria ogni x minuti + remoto + Ricerca del server Plex + Utilizzato dalla sincronizzazione e quando si utilizza la riproduzione diretta + Personalizza i percorsi + Estendi la vista "On Deck" delle Serie TV a tutte le serie + Aggiunti di recente: Aggiungere il titolo della serie all'episodio + Aggiunti di recente: Aggiungere il numero della stagione e dell'episodio (SxxExx) + Vuoi scariare degli artwork aggiuntivi da FanartTV in background? + Sincronizzazione quando lo screensaver è disattivato + Forza transcodifica Hi10P + Aggiunti di recente: mostra anche gli episodi già visti + Aggiunti di recente: mostra anche i film già visti (Aggiornare playlist/nodi Plex!) + Il tuo Plex Media Server corrente: + [COLOR yellow]Inserisci manualmente l'indirizzo del Plex Media Server[/COLOR] + Indirizzo attuale: + Porta attuale: + Stato attuale di plex.tv: + Il tuo Kodi è installato in un dispositivo a bassa potenza come un Raspberry Pi? In caso affermativo, sarà ridotto l'utilizzo delle risorse per prevenire arresti anomali. + Impostazioni aspetto + Serie TV + Usa sempre i sottotitoli predefiniti di Plex se possibile + Se usi diverse librerie Plex dello stesso tipo (es. "Film Ragazzi" e "Film Genitori") controlla il Wiki: https://goo.gl/JFtQV9 + Numero di elementi PMS da mostrare nei widget (es. "On Deck") + Porta Plex Companion (modifica solo se necessario) + Plex Companion non può aprire la porta GDM. Si prega di modificarla nelle impostazioni di PKC. + + + Logout utente Plex + Impostazioni + Credenziali di rete + Aggiorna playlist/nodi Plex + Eseguire sincronizzazione manuale della libreria + Impossibile eseguire la sincronizzazione, l'addon non è connesso ad un server Plex. + Plex potrebbe bloccare il tuo account se fallisci l'accesso troppe volte. Procedere comunque? + Reset connessioni PMS, si prega di attendere + Impossibile resettare PKC. Prova a riavviare Kodi. + [COLOR yellow]Login/Logout plex.tv[/COLOR] + Non ancora connesso al Server Plex + Guarda più tardi + non è attivo + Anche se è stato effettuato l'accesso a plex.tv, non è possibile autorizzare il PMS + Inserisci l'IP o l'URL del tuo Plex Media Server. Ad esempio: + + Il tuo Plex Media Server supporta le connessioni SSL (https invece di http)? + Errore connessione PMS + Annullare (Sì) o salvare comunque l'indirizzo (No)? + connesso + Login/Logout plex.tv eseguito + [COLOR yellow]Cercare ora fanart mancanti su FanartTV[/COLOR] + Cercare solo fanart mancanti o aggiornare tutte le fanart? La scansione impiegherà un po' di tempo e avverrà in background. + Aggiorna tutto + Solo mancanti + + + + Il caching delle immagini può richiedere diverso tempo. Sarà eseguito in background. Sei sicuro di voler continuare? + Resettare prima tutti i dati in cache? + + + : Inserisci l'username plex.tv. O niente per annullare. + Inserisci la password per l'utente plex.tv + Impossibile autenticare l'utente + Errore durante la connessione a plex.tv. Riprovare più tardi + Vai su https://plex.tv/pin e inserisci il codice: + Impossibile accedere a plex.tv. Riprovare più tardi + : Seleziona Utente + Immettere il PIN per l'utente + Impossibile autenticare l'utente + Si prega di riprovare. + sconosciuto + oppure premere No per non accedere. + + + Il thread di sincronizzazione della libreria è crashato. E' necessario riavviare Kodi ora. Si prega di segnalare l'anomalia sul forum + Il database di Kodi deve essere ricreato per questa versione. Questa operazione potrebbe richiedere un po' di tempo. Procedere? + potrebbe non funzionare correttamente finché non viene resettato il database. + Annullamento della sincronizzazione del database. La versione corrente di Kodi non è supportata. Per maggiori informazioni si prega di verificare i log. + L'avvio della sincronizzazione è fallito ripetutamente. Provare a riavviare Kodi. La sincronizzazione è stata temporaneamente arrestata. + Playlist/Nodi Plex aggiornati + Aggiornamento playlist/nodi Plex fallito + Sincronizzazione completa libreria terminata + La sincronizzazione ha dovuto saltare alcuni elementi perché non potevano essere elaborati. Kodi potrebbe risultare instabile ora!! Si prega di inviare i log di Kodi sul forum di Plex. + Il server Plex non è stato in grado di fornire troppi dati contemporaneamente e ha restituito degli errori. Si prega di ridurre il numero di thread di sincronizzazione nelle impostazioni. Alcuni elementi sono stati saltati per ora. + ERRORE nella sincronizzazione della libreria + + + On Deck + Collezioni + + + Sei sicuro di voler resettare il database di Kodi? La ri-sincronizzazione dei dati Plex richiederà del tempo in seguito. + Impossibile interrompere l'esecuzione del database. Si prega di riprovare più tardi. + Rimuovere tutti gli artwork in cache? (raccomandato!) + Resettare tutte le impostazioni di PlexKodiConnect? (questo solitamente NON E' raccomandato, né necessario!) + + Amazon Alexa (Riconoscimento vocale) + Attivare Alexa + Sfoglia cartelle + \ No newline at end of file From 79b873c0f599f81aa18b13cb4462775e91eca0b2 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 14:47:23 +0100 Subject: [PATCH 33/66] Update changelog --- changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.txt b/changelog.txt index a3c36ba9..5640c53d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ version 1.7.4 (beta only) - Show menu item only for appropriate Kodi library: Be careful to start video content through Videos -> Video Addons -> ... and pictures through Pictures -> Picture Addons -> ... - Fix playback error popup when using Alexa +- Update translations - Rewire Kodi ListItem stuff - Fix TypeError for setting ListItem streams - Fix Kodi setContent for images From d225d46dc9d55ec3165d1a29d0b1e97fca9a8963 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 14:49:15 +0100 Subject: [PATCH 34/66] Update readme --- README.md | 1 + changelog.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 4e3fc701..f798fa50 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Some people argue that PKC is 'hacky' because of the way it directly accesses th + Czech, thanks @Pavuucek + Spanish, thanks @bartolomesoriano + Danish, thanks @FIGHT + + Italian, thanks @nikkux, @chicco83 + More coming up: [you can help!](https://crowdin.com/project/plexkodiconnect/invite) - Automatically group movies into [movie sets](http://kodi.wiki/view/movie_sets) - Direct play from network paths (e.g. "\\\\server\\Plex\\movie.mkv") instead of streaming from slow HTTP (e.g. "192.168.1.1:32400"). You have to setup all your Plex libraries to point to such network paths. Do have a look at [the wiki here](https://github.com/croneter/PlexKodiConnect/wiki/Direct-Paths) diff --git a/changelog.txt b/changelog.txt index 5640c53d..5dcff2af 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ version 1.7.4 (beta only) - Show menu item only for appropriate Kodi library: Be careful to start video content through Videos -> Video Addons -> ... and pictures through Pictures -> Picture Addons -> ... - Fix playback error popup when using Alexa +- New Italian translations, thanks @nikkux, @chicco83 - Update translations - Rewire Kodi ListItem stuff - Fix TypeError for setting ListItem streams From aad59c203579fdcdd416cbd48bc316ace4600303 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 15:04:08 +0100 Subject: [PATCH 35/66] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f798fa50..14aa8ee1 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ The [Wiki can be found here](https://github.com/croneter/PlexKodiConnect/wiki) a Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [installation guideline on how to do this](https://github.com/croneter/PlexKodiConnect/wiki/Installation). -**Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) +**Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) ### Important Notes From 40bb0a2bf1c842e822f53ff1ce51e0787a4e07a9 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 15:06:13 +0100 Subject: [PATCH 36/66] Revert "Update readme" This reverts commit aad59c203579fdcdd416cbd48bc316ace4600303. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 14aa8ee1..f798fa50 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ The [Wiki can be found here](https://github.com/croneter/PlexKodiConnect/wiki) a Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [installation guideline on how to do this](https://github.com/croneter/PlexKodiConnect/wiki/Installation). -**Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) +**Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) ### Important Notes From 740f414b7bc79227c439bdcd331da49b09becb7a Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 19 Mar 2017 15:06:39 +0100 Subject: [PATCH 37/66] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f798fa50..2587a8db 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ The [Wiki can be found here](https://github.com/croneter/PlexKodiConnect/wiki) a Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [installation guideline on how to do this](https://github.com/croneter/PlexKodiConnect/wiki/Installation). -**Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) +**Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) ### Important Notes From db08021c96007caff5ad3cd160e5d7739a6f40d2 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 15:21:33 +0100 Subject: [PATCH 38/66] Update readme --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2587a8db..268a8757 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ ## Status -[![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/issues) -[![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/pulls) +| | | +|---|---| +| Stable | [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) | +| Beta | [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) | +| [![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/issues) | [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/pulls) | # PlexKodiConnect (PKC) @@ -11,7 +14,7 @@ PKC combines the best of Kodi - ultra smooth navigation, beautiful and highly cu Have a look at [some screenshots](https://github.com/croneter/PlexKodiConnect/wiki/Some-PKC-Screenshots) to see what's possible. -### Help Translate! +### Please Help Translating Please help translate PlexKodiConnect into your language: [crowdin.com](https://crowdin.com/project/plexkodiconnect/invite) From 8b441bd53ab6e8b910651cd2b9a84d371313c066 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 15:27:32 +0100 Subject: [PATCH 39/66] Update Readme --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 268a8757..cda38b0e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ ## Status -| | | -|---|---| -| Stable | [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) | -| Beta | [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) | -| [![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/issues) | [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/pulls) | +**Stable:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) **Beta:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) + + +[![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/pulls) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a66870f19ced4fb98f94d9fd56e34e87)](https://www.codacy.com/app/croneter/PlexKodiConnect?utm_source=github.com&utm_medium=referral&utm_content=croneter/PlexKodiConnect&utm_campaign=Badge_Grade) # PlexKodiConnect (PKC) From db7d8531d14d52440b14537b240aab7a2642a525 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 15:32:25 +0100 Subject: [PATCH 40/66] Update Readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cda38b0e..a87dcd22 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ **Stable:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) **Beta:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) +[![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) +[![FAQ](https://img.shields.io/badge/wiki-FAQ-BF55EC.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/wiki/faq) [![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/pulls) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a66870f19ced4fb98f94d9fd56e34e87)](https://www.codacy.com/app/croneter/PlexKodiConnect?utm_source=github.com&utm_medium=referral&utm_content=croneter/PlexKodiConnect&utm_campaign=Badge_Grade) From cd86a06a1acb2fab1483081f1fa884882074a647 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 15:36:29 +0100 Subject: [PATCH 41/66] Update Readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a87dcd22..08031d21 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) [![FAQ](https://img.shields.io/badge/wiki-FAQ-BF55EC.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/wiki/faq) +[![Forum](https://img.shields.io/badge/forum-plex-orange.svg?maxAge=60&style=flat-square)](https://forums.plex.tv/discussion/210023/plexkodiconnect-let-kodi-talk-to-your-plex) [![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/pulls) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a66870f19ced4fb98f94d9fd56e34e87)](https://www.codacy.com/app/croneter/PlexKodiConnect?utm_source=github.com&utm_medium=referral&utm_content=croneter/PlexKodiConnect&utm_campaign=Badge_Grade) From 73088e54c5887f18862c171d57308249659c63d7 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 15:52:33 +0100 Subject: [PATCH 42/66] Update Readme --- README.md | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 08031d21..3128c95f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ Please help translate PlexKodiConnect into your language: [crowdin.com](https:// * [**Warning**](#warning) * [**What does PKC do?**](#what-does-pkc-do) * [**PKC Features**](#pkc-features) -* [**PKC Wiki & Frequently Asked Questions**](#pkc-wiki--frequently-asked-questions) * [**Download and Installation**](#download-and-installation) * [**Important notes**](#important-notes) * [**Donations**](#donations) @@ -37,16 +36,16 @@ Please help translate PlexKodiConnect into your language: [crowdin.com](https:// ### Warning Use at your own risk! 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. Don't worry if you want Plex to manage all your media (like you should ;-)). +Some people argue that PKC is 'hacky' because of the way it directly accesses the Kodi database. See [here for a more thorough discussion](https://github.com/croneter/PlexKodiConnect/wiki/Is-PKC-'hacky'%3F). + ### What does PKC do? PKC synchronizes your media from your Plex server to the native Kodi database. Hence: - Use virtually any other Kodi add-on - Use any Kodi skin, completely customize Kodi's look - Browse your media at full speed (cached artwork) -- Automatically get additional artwork (more than e.g. Plex offers) +- Automatically get additional artwork (more than Plex offers) - Enjoy Plex features using the Kodi interface -Some people argue that PKC is 'hacky' because of the way it directly accesses the Kodi database. See [here for a more thorough discussion](https://github.com/croneter/PlexKodiConnect/wiki/Is-PKC-'hacky'%3F). - ### PKC Features - [Amazon Alexa voice recognition](https://www.plex.tv/apps/streaming-devices/amazon-alexa) @@ -54,26 +53,17 @@ Some people argue that PKC is 'hacky' because of the way it directly accesses th - [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) - Automatically download more artwork from [Fanart.tv](https://fanart.tv/), just like the Kodi addon [Artwork Downloader](http://kodi.wiki/view/Add-on:Artwork_Downloader) - + Banners - + Disc art - + Clear logos - + Landscapes - + Clear art - + Extra fanart backgrounds -- PKC interface languages: +- Automatically group movies into [movie sets](http://kodi.wiki/view/movie_sets) +- [Direct play](https://github.com/croneter/PlexKodiConnect/wiki/Direct-Play) from network paths (e.g. "\\\\server\\Plex\\movie.mkv"), something unique to PKC +- Delete PMS items from the Kodi context menu +- PKC is available in the following languages: + English + German + Czech, thanks @Pavuucek + Spanish, thanks @bartolomesoriano + Danish, thanks @FIGHT + Italian, thanks @nikkux, @chicco83 - + More coming up: [you can help!](https://crowdin.com/project/plexkodiconnect/invite) -- Automatically group movies into [movie sets](http://kodi.wiki/view/movie_sets) -- Direct play from network paths (e.g. "\\\\server\\Plex\\movie.mkv") instead of streaming from slow HTTP (e.g. "192.168.1.1:32400"). You have to setup all your Plex libraries to point to such network paths. Do have a look at [the wiki here](https://github.com/croneter/PlexKodiConnect/wiki/Direct-Paths) -- Delete PMS items from the Kodi context menu - -### PKC Wiki & Frequently Asked Questions -The [Wiki can be found here](https://github.com/croneter/PlexKodiConnect/wiki) and will hopefully answer all your questions. You can even edit the wiki yourself! + + [Please help translating](https://crowdin.com/project/plexkodiconnect/invite) ### Download and Installation [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) From 79e345a445a615cc86444bdbb8141698bd456378 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 15:54:10 +0100 Subject: [PATCH 43/66] Update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3128c95f..6c06ddf7 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ **Stable:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) **Beta:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) [![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) -[![FAQ](https://img.shields.io/badge/wiki-FAQ-BF55EC.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/wiki/faq) -[![Forum](https://img.shields.io/badge/forum-plex-orange.svg?maxAge=60&style=flat-square)](https://forums.plex.tv/discussion/210023/plexkodiconnect-let-kodi-talk-to-your-plex) +[![FAQ](https://img.shields.io/badge/wiki-FAQ-BF55EC.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq) +[![Forum](https://img.shields.io/badge/forum-plex-orange.svg?maxAge=60&style=flat)](https://forums.plex.tv/discussion/210023/plexkodiconnect-let-kodi-talk-to-your-plex) -[![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/pulls) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a66870f19ced4fb98f94d9fd56e34e87)](https://www.codacy.com/app/croneter/PlexKodiConnect?utm_source=github.com&utm_medium=referral&utm_content=croneter/PlexKodiConnect&utm_campaign=Badge_Grade) +[![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/pulls) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a66870f19ced4fb98f94d9fd56e34e87)](https://www.codacy.com/app/croneter/PlexKodiConnect?utm_source=github.com&utm_medium=referral&utm_content=croneter/PlexKodiConnect&utm_campaign=Badge_Grade) # PlexKodiConnect (PKC) From ef57c2e8f6f1ca01eb626ff31d3a2535c3fe6050 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 16:02:09 +0100 Subject: [PATCH 44/66] Update Readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c06ddf7..00ad54a8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Stable:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) **Beta:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) -[![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat-square)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) +[![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) [![FAQ](https://img.shields.io/badge/wiki-FAQ-BF55EC.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq) [![Forum](https://img.shields.io/badge/forum-plex-orange.svg?maxAge=60&style=flat)](https://forums.plex.tv/discussion/210023/plexkodiconnect-let-kodi-talk-to-your-plex) @@ -68,7 +68,7 @@ PKC synchronizes your media from your Plex server to the native Kodi database. H ### Download and Installation [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) -Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [installation guideline on how to do this](https://github.com/croneter/PlexKodiConnect/wiki/Installation). +Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [github wiki installation manual](https://github.com/croneter/PlexKodiConnect/wiki/Installation). **Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) From 0a0810b68fcba0e570cfae5ae5664c7a5e932683 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 16:03:01 +0100 Subject: [PATCH 45/66] Update readme --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 00ad54a8..44e53589 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -## Status - **Stable:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) **Beta:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) [![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) From 0f4353bc6f9e12188b5e6a12753d696039ad7f46 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 16:10:25 +0100 Subject: [PATCH 46/66] Update readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44e53589..15fb4ac9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -**Stable:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) **Beta:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) +[![stable version](https://img.shields.io/badge/stable_version-1.7.2-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) +[![beta version](https://img.shields.io/badge/beta_version-1.7.4-red.svg?maxAge=60&style=flat) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) [![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) -[![FAQ](https://img.shields.io/badge/wiki-FAQ-BF55EC.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq) +[![FAQ](https://img.shields.io/badge/wiki-FAQ-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq) [![Forum](https://img.shields.io/badge/forum-plex-orange.svg?maxAge=60&style=flat)](https://forums.plex.tv/discussion/210023/plexkodiconnect-let-kodi-talk-to-your-plex) [![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/pulls) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a66870f19ced4fb98f94d9fd56e34e87)](https://www.codacy.com/app/croneter/PlexKodiConnect?utm_source=github.com&utm_medium=referral&utm_content=croneter/PlexKodiConnect&utm_campaign=Badge_Grade) From 51d913825173a0a1cc8c33f3c14664fa224c9c62 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 16:19:19 +0100 Subject: [PATCH 47/66] Update readme --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 15fb4ac9..fcaf58e0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -[![stable version](https://img.shields.io/badge/stable_version-1.7.2-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect) -[![beta version](https://img.shields.io/badge/beta_version-1.7.4-red.svg?maxAge=60&style=flat) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) +[![stable version](https://img.shields.io/badge/stable_version-1.7.2-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) +[![beta version](https://img.shields.io/badge/beta_version-1.7.4-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) + +https://bintray.com/croneter/PlexKodiConnect_BETA/download_file?file_path=bin-BETA%2Frepository.plexkodiconnectbeta%2Frepository.plexkodiconnectbeta-1.0.0.zip [![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) [![FAQ](https://img.shields.io/badge/wiki-FAQ-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq) @@ -67,9 +69,10 @@ PKC synchronizes your media from your Plex server to the native Kodi database. H ### Download and Installation [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) -Install PKC via the PlexKodiConnect Kodi repository (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [github wiki installation manual](https://github.com/croneter/PlexKodiConnect/wiki/Installation). +Install PKC via the PlexKodiConnect Kodi repository below (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [github wiki installation manual](https://github.com/croneter/PlexKodiConnect/wiki/Installation). Please use the stable version except if you really know what you're doing. Kodi will update PKC automatically. -**Possibly UNSTABLE BETA version:** [ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/images/download.svg) ](https://bintray.com/croneter/PlexKodiConnect_BETA/PlexKodiConnect_BETA/_latestVersion) +| Stable version | Beta version | +| [![stable version](https://img.shields.io/badge/stable_version-latest-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) | [![beta version](https://img.shields.io/badge/beta_version-latest-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) | ### Important Notes From 8267304237138ae82afdc29726f614b30e885460 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 16:20:38 +0100 Subject: [PATCH 48/66] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fcaf58e0..cde5b499 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,11 @@ PKC synchronizes your media from your Plex server to the native Kodi database. H + [Please help translating](https://crowdin.com/project/plexkodiconnect/invite) ### Download and Installation -[ ![Download](https://api.bintray.com/packages/croneter/PlexKodiConnect/PlexKodiConnect/images/download.svg) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) Install PKC via the PlexKodiConnect Kodi repository below (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [github wiki installation manual](https://github.com/croneter/PlexKodiConnect/wiki/Installation). Please use the stable version except if you really know what you're doing. Kodi will update PKC automatically. | Stable version | Beta version | +|----------------|--------------| | [![stable version](https://img.shields.io/badge/stable_version-latest-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) | [![beta version](https://img.shields.io/badge/beta_version-latest-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) | ### Important Notes From 9975a2a587c33907308c9a298b485cf0f126c46f Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 24 Mar 2017 16:22:27 +0100 Subject: [PATCH 49/66] Update readme --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index cde5b499..b156f8f6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ [![stable version](https://img.shields.io/badge/stable_version-1.7.2-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) [![beta version](https://img.shields.io/badge/beta_version-1.7.4-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) -https://bintray.com/croneter/PlexKodiConnect_BETA/download_file?file_path=bin-BETA%2Frepository.plexkodiconnectbeta%2Frepository.plexkodiconnectbeta-1.0.0.zip - [![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) [![FAQ](https://img.shields.io/badge/wiki-FAQ-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq) [![Forum](https://img.shields.io/badge/forum-plex-orange.svg?maxAge=60&style=flat)](https://forums.plex.tv/discussion/210023/plexkodiconnect-let-kodi-talk-to-your-plex) @@ -68,7 +66,7 @@ PKC synchronizes your media from your Plex server to the native Kodi database. H ### Download and Installation -Install PKC via the PlexKodiConnect Kodi repository below (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [github wiki installation manual](https://github.com/croneter/PlexKodiConnect/wiki/Installation). Please use the stable version except if you really know what you're doing. Kodi will update PKC automatically. +Install PKC via the PlexKodiConnect Kodi repository below (we cannot use the official Kodi repository as PKC messes with Kodi's databases). See the [github wiki installation manual](https://github.com/croneter/PlexKodiConnect/wiki/Installation) for a detailed guide. Please use the stable version except if you really know what you're doing. Kodi will update PKC automatically. | Stable version | Beta version | |----------------|--------------| From 944246b716d678ee0b7a27854934ee13d21030d3 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 26 Mar 2017 12:51:16 +0200 Subject: [PATCH 50/66] Don't log xml for playlists --- resources/lib/playlist_func.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index 61d28b7c..ee336a73 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -164,17 +164,6 @@ def playlist_item_from_xml(playlist, xml_video_element): return item -def _log_xml(xml): - try: - xml.attrib - except AttributeError: - log.error('Did not receive an XML. Answer was: %s' % xml) - else: - from xml.etree.ElementTree import dump - log.error('XML received from the PMS:') - dump(xml) - - def _get_playListVersion_from_xml(playlist, xml): """ Takes a PMS xml as input to overwrite the playlist version (e.g. Plex @@ -185,7 +174,6 @@ def _get_playListVersion_from_xml(playlist, xml): except (TypeError, AttributeError, KeyError): log.error('Could not get new playlist Version for playlist %s' % playlist) - _log_xml(xml) return False return True @@ -208,7 +196,6 @@ def get_playlist_details_from_xml(playlist, xml): % playlist) import traceback log.error(traceback.format_exc()) - _log_xml(xml) raise KeyError log.debug('Updated playlist from xml: %s' % playlist) @@ -341,7 +328,6 @@ def add_item_to_PMS_playlist(playlist, pos, plex_id=None, kodi_item=None): except (TypeError, AttributeError, KeyError): log.error('Could not add item %s to playlist %s' % (kodi_item, playlist)) - _log_xml(xml) return # Get the guid for this item for plex_item in xml: From 4de4959c539df6a252d7dc969b08768421a93c9e Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 26 Mar 2017 13:23:37 +0200 Subject: [PATCH 51/66] Remove obsolete imports --- resources/lib/entrypoint.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 9acb1279..df028666 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -6,21 +6,16 @@ from sys import argv from urllib import urlencode import xbmcplugin -from xbmc import sleep, Player, executebuiltin, getCondVisibility, \ - translatePath +from xbmc import sleep, executebuiltin, translatePath from xbmcgui import ListItem from utils import window, settings, language as lang, dialog, tryDecode,\ tryEncode, CatchExceptions, JSONRPC import downloadutils -import playbackutils as pbutils -import plexdb_functions as plexdb from PlexFunctions import GetPlexMetadata, GetPlexSectionResults, \ GetMachineIdentifier from PlexAPI import API -from PKC_listitem import convert_PKC_to_listitem -from playqueue import Playqueue import variables as v ############################################################################### From 2a5cf9d798899c5b1e5a4601913180c3f0715c81 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 26 Mar 2017 14:09:43 +0200 Subject: [PATCH 52/66] Add Plex ID to photo ListItems --- resources/lib/PlexAPI.py | 22 ++++++++-------------- resources/lib/playlist_func.py | 6 +++++- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 9f69b026..a324f2e2 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -1210,7 +1210,8 @@ class API(): def get_picture_path(self): """ - Returns the item's picture path (transcode, if necessary) as string + Returns the item's picture path (transcode, if necessary) as string. + Will always use addon paths, never direct paths """ extension = self.item[0][0].attrib['key'][self.item[0][0].attrib['key'].rfind('.'):].lower() if (window('plex_force_transcode_pix') == 'true' or @@ -1224,19 +1225,12 @@ class API(): 1920, 1080) else: - # Don't transcode - if window('useDirectPaths') == 'true': - # Addon Mode. Just give the path of the file to Kodi - path = self.addPlexCredentialsToUrl( - '%s%s' % (window('pms_server'), - self.item[0][0].attrib['key'])) - else: - # Native direct paths - path = self.validatePlayurl( - self.getFilePath(forceFirstMediaStream=True), - 'photo') - path = tryEncode(path) - return path + path = self.addPlexCredentialsToUrl( + '%s%s' % (window('pms_server'), + self.item[0][0].attrib['key'])) + # Attach Plex id to url to let it be picked up by our playqueue agent + # later + return tryEncode('%s&plex_id=%s' % (path, self.getRatingKey())) def getTVShowPath(self): """ diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index ee336a73..5fb9289c 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -1,9 +1,10 @@ import logging from urllib import quote +from urlparse import parse_qsl, urlsplit import plexdb_functions as plexdb from downloadutils import DownloadUtils as DU -from utils import JSONRPC, tryEncode, tryDecode +from utils import JSONRPC, tryEncode from PlexAPI import API ############################################################################### @@ -111,6 +112,9 @@ def playlist_item_from_kodi(kodi_item): except TypeError: pass item.file = kodi_item.get('file') + if item.file is not None and item.plex_id is None: + item.plex_id = dict( + parse_qsl(urlsplit(item.file).query)).get('plex_id') item.kodi_type = kodi_item.get('type') if item.plex_id is None: item.uri = 'library://whatever/item/%s' % quote(item.file, safe='') From c7bbe7cf46b77ea57a20e818c07baf94ba8f0097 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Wed, 29 Mar 2017 21:19:06 +0200 Subject: [PATCH 53/66] Version bump --- addon.xml | 2 +- changelog.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index d8f0f4d7..16b229a2 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 5dcff2af..3b3a64e7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +version 1.7.5 +- Dutch translation, thanks @mvanbaak + version 1.7.4 (beta only) - Show menu item only for appropriate Kodi library: Be careful to start video content through Videos -> Video Addons -> ... and pictures through Pictures -> Picture Addons -> ... - Fix playback error popup when using Alexa From 6ae7e77ab1185b2d94252261b24bba202e4ae012 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Wed, 29 Mar 2017 21:22:57 +0200 Subject: [PATCH 54/66] Update Dutch translation --- README.md | 1 + resources/language/Dutch/strings.xml | 168 +++++++++++++-------------- 2 files changed, 85 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index b156f8f6..d428e94a 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ PKC synchronizes your media from your Plex server to the native Kodi database. H + Spanish, thanks @bartolomesoriano + Danish, thanks @FIGHT + Italian, thanks @nikkux, @chicco83 + + Dutch, thanks @mvanbaak + [Please help translating](https://crowdin.com/project/plexkodiconnect/invite) ### Download and Installation diff --git a/resources/language/Dutch/strings.xml b/resources/language/Dutch/strings.xml index 98f3d1a3..981dfd47 100644 --- a/resources/language/Dutch/strings.xml +++ b/resources/language/Dutch/strings.xml @@ -236,9 +236,9 @@ Recent toegevoegde Thuis-video 's Recent toegevoegde foto's - Favoriete Thuis-Video's - Favoriete foto 's - Favoriete Albums + Favorite Home Videos + Favorite Photos + Favorite Albums Recent toegevoegde videoclips Actieve videoclips @@ -412,109 +412,109 @@ Voer uw aangepaste smb paden in de instellingen onder "Sync Opties" en herstart Kodi Oorspronkelijke Plex foto pad om te vervangen: Vervang Plex PHOTO met: - On Deck: Append show title to episode - On Deck: Append season- and episode-number SxxExx - Nothing works? Try a full reset! - [COLOR yellow]Choose Plex Server from a list[/COLOR] - Wait before sync new/changed PMS item [s] - Background Sync - Do a full library sync every x minutes + On Deck: Voeg show naam toe aan episode + On Deck: Voeg seizoen en aflevering nummer toe SxxExx + Niets werkt? Probeer een volledige reset! + [COLOR yellow]Kies Plex Server uit lijst[/COLOR] + Tijd voordat nieuwe/gewijzigde items gesynct worden [s] + Achtergrond Sync + Elke X minuten een volledige sync remote - Searching for Plex Server - Used by Sync and when attempting to Direct Play - Customize Paths - Extend Plex TV Series "On Deck" view to all shows - Recently Added: Append show title to episode - Recently Added: Append season- and episode-number SxxExx - Would you like to download additional artwork from FanArtTV in the background? - Sync when screensaver is deactivated - Force Transcode Hi10P - Recently Added: Also show already watched episodes - Recently Added: Also show already watched movies (Refresh Plex playlist/nodes!) - Your current Plex Media Server: - [COLOR yellow]Manually enter Plex Media Server address[/COLOR] - Current address: - Current port: - Current plex.tv status: - Is your Kodi installed on a low-powered device like a Raspberry Pi? If yes, then we will reduce the strain on Kodi to prevent it from crashing. - Appearance Tweaks - TV Shows - Always use default Plex subtitle if possible - 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 - Number of PMS items to show in widgets (e.g. "On Deck") - Plex Companion Update Port (change only if needed) - Plex Companion could not open the GDM port. Please change it in the PKC settings. + Plex Server zoeken + Gebruikt door Sync en bij Direct Play + Aanpassen van paden + On Deck van TV-series laat alle series zien + Onlangs Toegevoegd: Voeg show naam toe aan afleveringen + Onlangs Toegevoegd: Voeg seizoen en aflevering nummer toe SxxExx + Extra artwork van FanArtTV in de background downloaden? + Sync als screensaver gedeactiveerd is + Forceer transcoden van Hi10P + Onlangs Toegevoegd: Toon ook al bekeken afleveringen + Onlangs Toegevoegd: Toon ook al bekeken films (Ververs Plex playlist/nodes!) + Huidige Plex Media Server: + [COLOR yellow]Handmatig Plex Media Server adres invoeren[/COLOR] + Huidig adres: + Huidige poort: + Huidige status van de plex.tv: + Is Kodi geïnstalleerd op een low-powered apparaat zoals een Raspberry Pi? Zo ja, dan zullen we de druk op Kodi verlagen om de kans op crashen te verminderen. + Uiterlijk aanpassingen + TV shows + Gebruik indien mogelijk altijd standaard Plex ondertitels + Bij gebruik van meerdere plex libraries van hetzelfde type, bijvoorbeeld "Kinder Films" en "Films voor volwassenen" bekijk dan de Wiki: https://goo.gl/JFtQV9 + Aantal PMS items in widgets laten zien (bijv. "On Deck") + Plex Companion poort (alleen aanpassen indien nodig) + Plex Companion kon de GDM poort niet gebruiken. Wijzig deze in de PKC instellingen. - Log-out Plex Home User - Settings - Network credentials - Refresh Plex playlists/nodes - Perform manual library sync - Unable to run the sync, the add-on is not connected to a Plex server. - Plex might lock your account if you fail to log in too many times. Proceed anyway? - Resetting PMS connections, please wait - Failed to reset PKC. Try to restart Kodi. - [COLOR yellow]Toggle plex.tv login (sign in or sign out)[/COLOR] - Not yet connected to Plex Server - Watch later + Log-out Plex Home gebruiker + Instellingen + Netwerk gegevens + Vernieuwen van Plex afspeellijsten/nodes + Handmatige sync uitvoeren + Sync is niet gelukt, de add-on is niet verbonden met de Plex Server. + Plex kan uw account vergrendelen bij teveel foutieve login pogingen. Toch doorgaan? + Resetten van PMS verbindingen, een moment geduld a.u.b + PKC reset niet gelukt. Herstart Kodi. + [COLOR yellow]Verander plex.tv login (aanmelden of afmelden)[/COLOR] + Nog niet verbonden met Plex Server + Later bekijken is offline - Even though we signed in to plex.tv, we could not authorize for PMS - Enter your Plex Media Server's IP or URL, Examples are: + Hoewel aangemeld bij plex.tv, niet geauthorizeerd bij de PMS + Voer Plex Media Server adres in. Voorbeelden zijn: - Does your Plex Media Server support SSL connections? (https instead of http)? - Error contacting PMS - Abort (Yes) or save address anyway (No)? - connected - plex.tv toggle successful - [COLOR yellow]Look for missing fanart on FanartTV now[/COLOR] - Only look for missing fanart or refresh all fanart? The scan will take quite a while and happen in the background. - Refresh all - Missing only + Ondersteunt uw Plex Media Server SSL-verbindingen? (https in plaats van http)? + Fout bij verbinden met PMS + Afbreken (Ja) of adres toch opslaan (Nee)? + verbonden + plex.tv aanpassing succesvol + [COLOR yellow]Nu zoeken naar missende artwork op FanartTV[/COLOR] + Alleen missende artwork zoeken of alles verniewen? De scan kan lang duren en zal op de achtergrond plaatsvinden. + Alles vernieuwen + Alleen ontbrekende - Running the image cache process can take some time. It will happen in the background. Are you sure you want continue? - Reset all existing cache data first? + Uitvoeren van de afbeelding cache proces kan enige tijd duren. Het zal gebeuren in de achtergrond. Weet u zeker dat u wilt doorgaan? + Alle bestaande gegevens van de cache eerst resetten? - : Enter plex.tv username. Or nothing to cancel. - Enter password for plex.tv user - Could not sign in user - Problems trying to contact plex.tv. Try again later - Go to https://plex.tv/pin and enter the code: - Could not sign in to plex.tv. Try again later - : Select User - Enter PIN for user - Could not log in user - Please try again. - unknown - or press No to not sign in. + : Plex.tv gebruikersnaam. Of niets om te annuleren. + Wachtwoord voor gebruiker van plex.tv + Kan de gebruiker niet inloggen + Probleem met verbinding naar plex.tv. Probeer het later opnieuw + Ga naar https://plex.tv/pin en voer de code in: + Kan niet aanmelden bij plex.tv. Probeer het later opnieuw + : Selecteer gebruiker + Voer pincode voor gebruiker + Kan de gebruiker niet inloggen + Probeer opnieuw. + onbekend + of druk op Nee als u niet wilt inloggen. - Library sync thread has crashed. You should restart Kodi now. Please report this on the forum - Detected Kodi database needs to be recreated for this version. This might take a while. Proceed? - may not work correctly until the database is reset. + Sync is gecrashed. Herstart Kodi. Meldt dit probleem op het forum + Deze versie vereist een nieuwe database. Dit kan enige tijd duren. Doorgaan? + werkt mogelijk niet correct totdat de database opnieuw wordt ingesteld. Database syncing proces geannuleerd. Huidige Kodi versie wordt niet ondersteund. Controleer uw logbestanden voor meer info. - Startup syncing process failed repeatedly. Try restarting Kodi. Stopping Sync for now. - Plex playlists/nodes refreshed - Plex playlists/nodes refresh failed - Full library sync finished + Opstarten synchronisatie proces mislukt herhaaldelijk. Start Kodi opnieuw. Sync is voor nu geannuleerd. + Plex afspeellijsten/nodes vernieuwd + Plex afspeellijsten/nodes vernieuwen mislukt + Volledige bibliotheek sync klaar Sync diende een aantal bestanden over te slaan. Kodi werkt misschien niet langer stabiel. Gelieve uw Kodi log bestanden op het Plex forum te posten. - The Plex Server did not like you asking for so much data at once and returned ERRORS. Try lowering the number of sync download threads in the settings. Skipped some items for now. - ERROR in library sync + Plex gaf fouten terug door de gevraagde hoeveelheid data. Verminder het aantal sync threads in de instellingen. Sommige items zijn overgeslagen. + FOUT in bibliotheek sync On Deck - Collections + Verzamelingen - Are you sure you want to reset your local Kodi database? A re-sync of the Plex data will take time afterwards. - Could not stop the database from running. Please try again later. + Lokale database van Kodi resetten? Een hersynchronisatie is nodig en kan enige tijd duren. + Kon de database synchronisatie niet stoppen. Probeer het later nog eens. Verwijder artwork cache? (aanbevolen!) Reset alle instellingen van de PlexKodiConnect Addon? (dit is gewoonlijk niet aanbevolen en onnodig!) Amazon Alexa (spraakherkenning) Aktiveer Alexa - Browse by folder + Per map bladeren \ No newline at end of file From 9b35efe0dd82f1acff0e571d739f27dfa699b80e Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Wed, 29 Mar 2017 21:28:15 +0200 Subject: [PATCH 55/66] Update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d428e94a..f75de095 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![stable version](https://img.shields.io/badge/stable_version-1.7.2-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) -[![beta version](https://img.shields.io/badge/beta_version-1.7.4-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) +[![stable version](https://img.shields.io/badge/stable_version-1.7.5-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) +[![beta version](https://img.shields.io/badge/beta_version-1.7.5-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) [![Installation](https://img.shields.io/badge/wiki-installation-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/Installation) [![FAQ](https://img.shields.io/badge/wiki-FAQ-brightgreen.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/wiki/faq) From 68f82eaed0fba200e209df5d347246750044ef0c Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 31 Mar 2017 12:26:17 +0200 Subject: [PATCH 56/66] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f75de095..63bb3209 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ + +# PlexKodiConnect (PKC) + [![stable version](https://img.shields.io/badge/stable_version-1.7.5-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) [![beta version](https://img.shields.io/badge/beta_version-1.7.5-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) @@ -8,7 +11,6 @@ [![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/pulls) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a66870f19ced4fb98f94d9fd56e34e87)](https://www.codacy.com/app/croneter/PlexKodiConnect?utm_source=github.com&utm_medium=referral&utm_content=croneter/PlexKodiConnect&utm_campaign=Badge_Grade) -# PlexKodiConnect (PKC) **Combine the best frontend media player Kodi with the best multimedia backend server Plex** PKC combines the best of Kodi - ultra smooth navigation, beautiful and highly customizable user interfaces and playback of any file under the sun - and the Plex Media Server. From 1731204b14bd9f8c7f518011d1c9fd7387196f85 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 31 Mar 2017 16:25:24 +0200 Subject: [PATCH 57/66] Revert "Update README.md" This reverts commit 68f82eaed0fba200e209df5d347246750044ef0c. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 63bb3209..f75de095 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ - -# PlexKodiConnect (PKC) - [![stable version](https://img.shields.io/badge/stable_version-1.7.5-blue.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect/bin/repository.plexkodiconnect/repository.plexkodiconnect-1.0.0.zip) [![beta version](https://img.shields.io/badge/beta_version-1.7.5-red.svg?maxAge=60&style=flat) ](https://dl.bintray.com/croneter/PlexKodiConnect_BETA/bin-BETA/repository.plexkodiconnectbeta/repository.plexkodiconnectbeta-1.0.0.zip) @@ -11,6 +8,7 @@ [![GitHub issues](https://img.shields.io/github/issues/croneter/PlexKodiConnect.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/croneter/PlexKodiConnect.svg?maxAge=60&style=flat)](https://github.com/croneter/PlexKodiConnect/pulls) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a66870f19ced4fb98f94d9fd56e34e87)](https://www.codacy.com/app/croneter/PlexKodiConnect?utm_source=github.com&utm_medium=referral&utm_content=croneter/PlexKodiConnect&utm_campaign=Badge_Grade) +# PlexKodiConnect (PKC) **Combine the best frontend media player Kodi with the best multimedia backend server Plex** PKC combines the best of Kodi - ultra smooth navigation, beautiful and highly customizable user interfaces and playback of any file under the sun - and the Plex Media Server. From 0cda3563de53e3afe61867b649035044460469b0 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 31 Mar 2017 16:42:39 +0200 Subject: [PATCH 58/66] Remove obsolete method --- resources/lib/itemtypes.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 5c419afd..4e853611 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -1259,14 +1259,6 @@ class TVShows(Items): class Music(Items): - def __init__(self): - Items.__init__(self) - - self.directstream = settings('streamMusic') == "true" - self.enableimportsongrating = settings('enableImportSongRating') == "true" - self.enableexportsongrating = settings('enableExportSongRating') == "true" - self.enableupdatesongrating = settings('enableUpdateSongRating') == "true" - def __enter__(self): """ OVERWRITE this method, because we need to open another DB. From 498dfb67d7aaf2115c96c89f736be16332d22027 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 31 Mar 2017 16:43:05 +0200 Subject: [PATCH 59/66] Remove obsolete import --- resources/lib/itemtypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 4e853611..b99a957c 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -9,7 +9,7 @@ from datetime import datetime from xbmc import sleep import artwork -from utils import tryEncode, tryDecode, settings, window, kodiSQL, \ +from utils import tryEncode, tryDecode, window, kodiSQL, \ CatchExceptions import plexdb_functions as plexdb import kodidb_functions as kodidb From a3201f8a30f53037e9fcce2851ec61ba373aeb26 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 31 Mar 2017 16:43:44 +0200 Subject: [PATCH 60/66] Beautify --- resources/lib/itemtypes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index b99a957c..2e994043 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -9,8 +9,7 @@ from datetime import datetime from xbmc import sleep import artwork -from utils import tryEncode, tryDecode, window, kodiSQL, \ - CatchExceptions +from utils import tryEncode, tryDecode, window, kodiSQL, CatchExceptions import plexdb_functions as plexdb import kodidb_functions as kodidb From 95fd016bd792a4ab88da2789f8a96a3937885c5c Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sat, 1 Apr 2017 18:28:02 +0200 Subject: [PATCH 61/66] Code refactoring of download in chunks --- resources/lib/PlexFunctions.py | 57 ++++++++++++---------------------- resources/lib/entrypoint.py | 4 +-- resources/lib/librarysync.py | 45 ++++++++++----------------- 3 files changed, 37 insertions(+), 69 deletions(-) diff --git a/resources/lib/PlexFunctions.py b/resources/lib/PlexFunctions.py index 04e1a6ff..9c1284e2 100644 --- a/resources/lib/PlexFunctions.py +++ b/resources/lib/PlexFunctions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import logging +from logging import getLogger from urllib import urlencode from ast import literal_eval from urlparse import urlparse, parse_qsl @@ -12,7 +12,9 @@ from variables import PLEX_TO_KODI_TIMEFACTOR ############################################################################### -log = logging.getLogger("PLEX."+__name__) +log = getLogger("PLEX."+__name__) + +CONTAINERSIZE = int(settings('limitindex')) ############################################################################### @@ -141,7 +143,7 @@ def GetPlexMetadata(key): return xml -def GetAllPlexChildren(key, containerSize=None): +def GetAllPlexChildren(key): """ Returns a list (raw xml API dump) of all Plex children for the key. (e.g. /library/metadata/194853/children pointing to a season) @@ -149,11 +151,10 @@ def GetAllPlexChildren(key, containerSize=None): Input: key Key to a Plex item, e.g. 12345 """ - url = "{server}/library/metadata/%s/children?" % key - return DownloadChunks(url, containerSize) + return DownloadChunks("{server}/library/metadata/%s/children?" % key) -def GetPlexSectionResults(viewId, args=None, containerSize=None): +def GetPlexSectionResults(viewId, args=None): """ Returns a list (XML API dump) of all Plex items in the Plex section with key = viewId. @@ -166,38 +167,23 @@ def GetPlexSectionResults(viewId, args=None, containerSize=None): url = "{server}/library/sections/%s/all?" % viewId if args: url += urlencode(args) + '&' - return DownloadChunks(url, containerSize) + return DownloadChunks(url) -def DownloadChunks(url, containerSize): +def DownloadChunks(url): """ - Downloads PMS url in chunks of containerSize (int). - If containerSize is None: ONE xml is fetched directly + Downloads PMS url in chunks of CONTAINERSIZE. url MUST end with '?' (if no other url encoded args are present) or '&' Returns a stitched-together xml or None. """ - if containerSize is None: - # Get rid of '?' or '&' at the end of url - xml = downloadutils.DownloadUtils().downloadUrl(url[:-1]) - if xml == 401: - return 401 - try: - xml.attrib - except AttributeError: - # Nope, not an XML, abort - log.error("Error getting url %s" % url[:-1]) - return None - else: - return xml - xml = None pos = 0 errorCounter = 0 while errorCounter < 10: args = { - 'X-Plex-Container-Size': containerSize, + 'X-Plex-Container-Size': CONTAINERSIZE, 'X-Plex-Container-Start': pos } xmlpart = downloadutils.DownloadUtils().downloadUrl( @@ -208,33 +194,32 @@ def DownloadChunks(url, containerSize): except AttributeError: log.error('Error while downloading chunks: %s' % (url + urlencode(args))) - pos += containerSize + pos += CONTAINERSIZE errorCounter += 1 continue # Very first run: starting xml (to retain data in xml's root!) if xml is None: xml = deepcopy(xmlpart) - if len(xmlpart) < containerSize: + if len(xmlpart) < CONTAINERSIZE: break else: - pos += containerSize + pos += CONTAINERSIZE continue # Build answer xml - containing the entire library for child in xmlpart: xml.append(child) # Done as soon as we don't receive a full complement of items - if len(xmlpart) < containerSize: + if len(xmlpart) < CONTAINERSIZE: break - pos += containerSize + pos += CONTAINERSIZE if errorCounter == 10: log.error('Fatal error while downloading chunks for %s' % url) return None return xml -def GetAllPlexLeaves(viewId, lastViewedAt=None, updatedAt=None, - containerSize=None): +def GetAllPlexLeaves(viewId, lastViewedAt=None, updatedAt=None): """ Returns a list (raw XML API dump) of all Plex subitems for the key. (e.g. /library/sections/2/allLeaves pointing to all TV shows) @@ -245,7 +230,6 @@ def GetAllPlexLeaves(viewId, lastViewedAt=None, updatedAt=None, since that point of time until now. updatedAt Unix timestamp; only retrieves PMS items updated by the PMS since that point of time until now. - containerSize Number of items simultaneously fetched from PMS If lastViewedAt and updatedAt=None, ALL PMS items are returned. @@ -265,14 +249,13 @@ def GetAllPlexLeaves(viewId, lastViewedAt=None, updatedAt=None, url += '?' + '&'.join(args) + '&' else: url += '?' - return DownloadChunks(url, containerSize) + return DownloadChunks(url) -def GetPlexOnDeck(viewId, containerSize=None): +def GetPlexOnDeck(viewId): """ """ - url = "{server}/library/sections/%s/onDeck?" % viewId - return DownloadChunks(url, containerSize) + return DownloadChunks("{server}/library/sections/%s/onDeck?" % viewId) def GetPlexCollections(mediatype): diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index df028666..2f373308 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -791,9 +791,7 @@ def browse_plex(key=None, plex_section_id=None): if key: xml = downloadutils.DownloadUtils().downloadUrl('{server}%s' % key) else: - xml = GetPlexSectionResults( - plex_section_id, - containerSize=int(settings('limitindex'))) + xml = GetPlexSectionResults(plex_section_id) try: xml[0].attrib except (ValueError, AttributeError, IndexError, TypeError): diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 8de3a96a..2db99558 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -346,7 +346,6 @@ class LibrarySync(Thread): self.enableMusic = settings('enableMusic') == "true" self.enableBackgroundSync = settings( 'enableBackgroundSync') == "true" - self.limitindex = int(settings('limitindex')) # Init for replacing paths window('remapSMB', value=settings('remapSMB')) @@ -422,8 +421,7 @@ class LibrarySync(Thread): if not view.attrib['type'] == mediatype: continue libraryId = view.attrib['key'] - items = GetAllPlexLeaves(libraryId, - containerSize=self.limitindex) + items = GetAllPlexLeaves(libraryId) if items in (None, 401): log.error("Could not download section %s" % view.attrib['key']) @@ -468,9 +466,7 @@ class LibrarySync(Thread): # Let the PMS process this first! xbmc.sleep(1000) # Get PMS items to find the item we just changed - items = GetAllPlexLeaves(libraryId, - lastViewedAt=timestamp, - containerSize=self.limitindex) + items = GetAllPlexLeaves(libraryId, lastViewedAt=timestamp) # Toggle watched state back scrobble(plexId, 'unwatched') if items in (None, 401): @@ -1083,8 +1079,7 @@ class LibrarySync(Thread): # Get items per view viewId = view['id'] viewName = view['name'] - all_plexmovies = GetPlexSectionResults( - viewId, args=None, containerSize=self.limitindex) + all_plexmovies = GetPlexSectionResults(viewId, args=None) if all_plexmovies is None: log.info("Couldnt get section items, aborting for view.") continue @@ -1127,8 +1122,7 @@ class LibrarySync(Thread): return xml = GetAllPlexLeaves(viewId, lastViewedAt=lastViewedAt, - updatedAt=updatedAt, - containerSize=self.limitindex) + updatedAt=updatedAt) # Return if there are no items in PMS reply - it's faster try: xml[0].attrib @@ -1178,8 +1172,7 @@ class LibrarySync(Thread): # Get items per view viewId = view['id'] viewName = view['name'] - allPlexTvShows = GetPlexSectionResults( - viewId, containerSize=self.limitindex) + allPlexTvShows = GetPlexSectionResults(viewId) if allPlexTvShows is None: log.error("Error downloading show xml for view %s" % viewId) continue @@ -1206,8 +1199,7 @@ class LibrarySync(Thread): if self.threadStopped(): return False # Grab all seasons to tvshow from PMS - seasons = GetAllPlexChildren( - tvShowId, containerSize=self.limitindex) + seasons = GetAllPlexChildren(tvShowId) if seasons is None: log.error("Error download season xml for show %s" % tvShowId) continue @@ -1232,8 +1224,7 @@ class LibrarySync(Thread): if self.threadStopped(): return False # Grab all episodes to tvshow from PMS - episodes = GetAllPlexLeaves( - view['id'], containerSize=self.limitindex) + episodes = GetAllPlexLeaves(view['id']) if episodes is None: log.error("Error downloading episod xml for view %s" % view.get('name')) @@ -1297,12 +1288,17 @@ class LibrarySync(Thread): } # Process artist, then album and tracks last to minimize overhead + # Each album needs to be processed directly with its songs + # Remaining songs without album will be processed last for kind in (v.PLEX_TYPE_ARTIST, v.PLEX_TYPE_ALBUM, v.PLEX_TYPE_SONG): if self.threadStopped(): return False log.debug("Start processing music %s" % kind) + self.allKodiElementsId = {} + self.allPlexElementsId = {} + self.updatelist = [] if self.ProcessMusic(views, kind, urlArgs[kind], @@ -1326,10 +1322,6 @@ class LibrarySync(Thread): return True def ProcessMusic(self, views, kind, urlArgs, method): - self.allKodiElementsId = {} - self.allPlexElementsId = {} - self.updatelist = [] - # Get a list of items already existing in Kodi db if self.compare: with plexdb.Get_Plex_DB() as plex_db: @@ -1340,17 +1332,13 @@ class LibrarySync(Thread): # Yet empty/nothing yet synched except ValueError: pass - for view in views: if self.threadStopped(): return False # Get items per view - viewId = view['id'] - viewName = view['name'] - itemsXML = GetPlexSectionResults( - viewId, args=urlArgs, containerSize=self.limitindex) + itemsXML = GetPlexSectionResults(view['id'], args=urlArgs) if itemsXML is None: - log.error("Error downloading xml for view %s" % viewId) + log.error("Error downloading xml for view %s" % view['id']) continue elif itemsXML == 401: return False @@ -1358,9 +1346,8 @@ class LibrarySync(Thread): self.GetUpdatelist(itemsXML, 'Music', method, - viewName, - viewId) - + view['name'], + view['id']) if self.compare: # Manual sync, process deletes with itemtypes.Music() as Music: From c049e8d05e95dae321f92a75d9af12cf6a339ac0 Mon Sep 17 00:00:00 2001 From: RickDB Date: Sun, 2 Apr 2017 14:11:13 +0200 Subject: [PATCH 62/66] Included additional info in stream selection dialog --- resources/lib/PlexAPI.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index a324f2e2..fec9e228 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -30,6 +30,7 @@ http://stackoverflow.com/questions/111945/is-there-any-way-to-do-http-put-in-pyt (and others...) """ +import os import logging from time import time import urllib2 @@ -2186,12 +2187,31 @@ class API(): # Several streams/files available. dialoglist = [] for entry in self.item.findall('./Media'): + fileName = '' + audioLanguage = '' + + # Get additional info (filename / languages) + mediaPartEntry = self.item.find('./Media/Part') + if mediaPartEntry is not None: + # Filename + if 'file' in mediaPartEntry.attrib: + fileName = os.path.basename(mediaPartEntry.attrib['file']) + + # Languages - subtitle does not seem to be directly included in this stream info + mediaPartStreamEntry = self.item.find('./Media/Part/Stream') + if mediaPartStreamEntry is not None: + # Audio language + if 'language' in mediaPartStreamEntry.attrib: + audioLanguage = mediaPartStreamEntry.attrib['language'] + dialoglist.append( - "%sp %s - %s (%s)" - % (entry.attrib.get('videoResolution', 'unknown'), - entry.attrib.get('videoCodec', 'unknown'), - entry.attrib.get('audioProfile', 'unknown'), - entry.attrib.get('audioCodec', 'unknown')) + "%sp %s - %s (%s) (%s) %s" % + (entry.attrib.get('videoResolution', 'unknown'), + entry.attrib.get('videoCodec', 'unknown'), + entry.attrib.get('audioProfile', 'unknown'), + entry.attrib.get('audioCodec', 'unknown'), + audioLanguage, + fileName) ) media = xbmcgui.Dialog().select('Select stream', dialoglist) else: From e64746f277e24f30c13aee9dcb9954a4607c5a79 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 2 Apr 2017 17:02:41 +0200 Subject: [PATCH 63/66] Huge music overhaul - Fixes #254 --- resources/lib/itemtypes.py | 346 +++++++++--------- resources/lib/library_sync/__init__.py | 1 + resources/lib/library_sync/fanart.py | 88 +++++ resources/lib/library_sync/get_metadata.py | 140 +++++++ .../lib/library_sync/process_metadata.py | 104 ++++++ resources/lib/library_sync/sync_info.py | 81 ++++ resources/lib/librarysync.py | 341 ++--------------- 7 files changed, 623 insertions(+), 478 deletions(-) create mode 100644 resources/lib/library_sync/__init__.py create mode 100644 resources/lib/library_sync/fanart.py create mode 100644 resources/lib/library_sync/get_metadata.py create mode 100644 resources/lib/library_sync/process_metadata.py create mode 100644 resources/lib/library_sync/sync_info.py diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 2e994043..5fa46dc9 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -1296,7 +1296,7 @@ class Music(Items): name, sortname = API.getTitle() # musicBrainzId = API.getProvider('MusicBrainzArtist') musicBrainzId = None - genres = API.joinList(API.getGenres()) + genres = ' / '.join(API.getGenres()) bio = API.getPlot() # Associate artwork @@ -1335,31 +1335,32 @@ class Music(Items): # Process the artist if v.KODIVERSION >= 16: - query = ' '.join(( - - "UPDATE artist", - "SET strGenres = ?, strBiography = ?, strImage = ?, strFanart = ?,", - "lastScraped = ?", - "WHERE idArtist = ?" - )) + query = ''' + UPDATE artist + SET strGenres = ?, strBiography = ?, strImage = ?, + strFanart = ?, lastScraped = ? + WHERE idArtist = ? + ''' kodicursor.execute(query, (genres, bio, thumb, fanart, lastScraped, artistid)) else: - query = ' '.join(( - - "UPDATE artist", - "SET strGenres = ?, strBiography = ?, strImage = ?, strFanart = ?,", - "lastScraped = ?, dateAdded = ?", - "WHERE idArtist = ?" - )) + query = ''' + UPDATE artist + SET strGenres = ?, strBiography = ?, strImage = ?, + strFanart = ?, lastScraped = ?, dateAdded = ? + WHERE idArtist = ? + ''' kodicursor.execute(query, (genres, bio, thumb, fanart, lastScraped, dateadded, artistid)) # Update artwork - artwork.addArtwork(artworks, artistid, "artist", kodicursor) + artwork.addArtwork(artworks, artistid, v.KODI_TYPE_ARTIST, kodicursor) @CatchExceptions(warnuser=True) - def add_updateAlbum(self, item, viewtag=None, viewid=None): + def add_updateAlbum(self, item, viewtag=None, viewid=None, children=None): + """ + children: list of child xml's, so in this case songs + """ kodicursor = self.kodicursor plex_db = self.plex_db artwork = self.artwork @@ -1387,21 +1388,21 @@ class Music(Items): # musicBrainzId = API.getProvider('MusicBrainzAlbum') musicBrainzId = None year = API.getYear() - genres = API.getGenres() - genre = API.joinList(genres) + self.genres = API.getGenres() + self.genre = ' / '.join(self.genres) bio = API.getPlot() rating = userdata['UserRating'] studio = API.getMusicStudio() - # artists = item['AlbumArtists'] - # if not artists: - # artists = item['ArtistItems'] - # artistname = [] - # for artist in artists: - # artistname.append(artist['Name']) artistname = item.attrib.get('parentTitle') if not artistname: artistname = item.attrib.get('originalTitle') - + # See if we have a compilation - Plex does NOT feature a compilation + # flag for albums + self.compilation = 0 + for child in children: + if child.attrib.get('originalTitle') is not None: + self.compilation = 1 + break # Associate artwork artworks = API.getAllArtwork(parentInfo=True) thumb = artworks['Primary'] @@ -1433,56 +1434,54 @@ class Music(Items): # Process the album info if v.KODIVERSION >= 17: # Kodi Krypton - query = ' '.join(( - - "UPDATE album", - "SET strArtists = ?, iYear = ?, strGenres = ?, strReview = ?, strImage = ?,", - "iUserrating = ?, lastScraped = ?, strReleaseType = ?, " - "strLabel = ? ", - "WHERE idAlbum = ?" - )) - kodicursor.execute(query, (artistname, year, genre, bio, thumb, - rating, lastScraped, "album", studio, - albumid)) + query = ''' + UPDATE album + SET strArtists = ?, iYear = ?, strGenres = ?, strReview = ?, + strImage = ?, iUserrating = ?, lastScraped = ?, + strReleaseType = ?, strLabel = ?, bCompilation = ? + WHERE idAlbum = ? + ''' + kodicursor.execute(query, (artistname, year, self.genre, bio, + thumb, rating, lastScraped, + v.KODI_TYPE_ALBUM, studio, + self.compilation, albumid)) elif v.KODIVERSION == 16: # Kodi Jarvis - query = ' '.join(( - - "UPDATE album", - "SET strArtists = ?, iYear = ?, strGenres = ?, strReview = ?, strImage = ?,", - "iRating = ?, lastScraped = ?, strReleaseType = ?, " - "strLabel = ? ", - "WHERE idAlbum = ?" - )) - kodicursor.execute(query, (artistname, year, genre, bio, thumb, - rating, lastScraped, "album", studio, - albumid)) + query = ''' + UPDATE album + SET strArtists = ?, iYear = ?, strGenres = ?, strReview = ?, + strImage = ?, iRating = ?, lastScraped = ?, + strReleaseType = ?, strLabel = ?, bCompilation = ? + WHERE idAlbum = ? + ''' + kodicursor.execute(query, (artistname, year, self.genre, bio, + thumb, rating, lastScraped, + v.KODI_TYPE_ALBUM, studio, + self.compilation, albumid)) elif v.KODIVERSION == 15: # Kodi Isengard - query = ' '.join(( - - "UPDATE album", - "SET strArtists = ?, iYear = ?, strGenres = ?, strReview = ?, strImage = ?,", - "iRating = ?, lastScraped = ?, dateAdded = ?, " - "strReleaseType = ?, strLabel = ? ", - "WHERE idAlbum = ?" - )) - kodicursor.execute(query, (artistname, year, genre, bio, thumb, - rating, lastScraped, dateadded, - "album", studio, albumid)) + query = ''' + UPDATE album + SET strArtists = ?, iYear = ?, strGenres = ?, strReview = ?, + strImage = ?, iRating = ?, lastScraped = ?, dateAdded = ?, + strReleaseType = ?, strLabel = ? + WHERE idAlbum = ? + ''' + kodicursor.execute(query, (artistname, year, self.genre, bio, + thumb, rating, lastScraped, dateadded, + v.KODI_TYPE_ALBUM, studio, albumid)) else: # Kodi Helix - query = ' '.join(( - - "UPDATE album", - "SET strArtists = ?, iYear = ?, strGenres = ?, strReview = ?, strImage = ?,", - "iRating = ?, lastScraped = ?, dateAdded = ?, " - "strLabel = ? ", - "WHERE idAlbum = ?" - )) - kodicursor.execute(query, (artistname, year, genre, bio, thumb, - rating, lastScraped, dateadded, studio, - albumid)) + query = ''' + UPDATE album + SET strArtists = ?, iYear = ?, strGenres = ?, strReview = ?, + strImage = ?, iRating = ?, lastScraped = ?, dateAdded = ?, + strLabel = ? + WHERE idAlbum = ? + ''' + kodicursor.execute(query, (artistname, year, self.genre, bio, + thumb, rating, lastScraped, dateadded, + studio, albumid)) # Associate the parentid for plex reference parentId = item.attrib.get('parentRatingKey') @@ -1496,7 +1495,7 @@ class Music(Items): artist = GetPlexMetadata(parentId) # Item may not be an artist, verification necessary. if artist is not None and artist != 401: - if artist[0].attrib.get('type') == "artist": + if artist[0].attrib.get('type') == v.PLEX_TYPE_ARTIST: # Update with the parentId, for remove reference plex_db.addReference(parentId, v.PLEX_TYPE_ARTIST, @@ -1530,29 +1529,26 @@ class Music(Items): % (artistname, artistid)) # Add artist to album - query = ( - ''' + query = ''' INSERT OR REPLACE INTO album_artist(idArtist, idAlbum, strArtist) - VALUES (?, ?, ?) - ''' - ) + ''' kodicursor.execute(query, (artistid, albumid, artistname)) # Update discography - query = ( - ''' + query = ''' INSERT OR REPLACE INTO discography(idArtist, strAlbum, strYear) - VALUES (?, ?, ?) - ''' - ) + ''' kodicursor.execute(query, (artistid, name, year)) # Update plex reference with parentid plex_db.updateParentId(artistId, albumid) # Add genres - self.kodi_db.addMusicGenres(albumid, genres, "album") + self.kodi_db.addMusicGenres(albumid, self.genres, v.KODI_TYPE_ALBUM) # Update artwork - artwork.addArtwork(artworks, albumid, "album", kodicursor) + artwork.addArtwork(artworks, albumid, v.KODI_TYPE_ALBUM, kodicursor) + # Add all children - all tracks + for child in children: + self.add_updateSong(child, viewtag, viewid) @CatchExceptions(warnuser=True) def add_updateSong(self, item, viewtag=None, viewid=None): @@ -1592,9 +1588,22 @@ class Music(Items): title, sorttitle = API.getTitle() # musicBrainzId = API.getProvider('MusicBrainzTrackId') musicBrainzId = None - genres = API.getGenres() - genre = API.joinList(genres) - artists = item.attrib.get('grandparentTitle') + try: + genres = self.genres + genre = self.genre + except AttributeError: + # No parent album - hence no genre information from Plex + genres = None + genre = None + try: + if self.compilation == 0: + artists = item.attrib.get('grandparentTitle') + else: + artists = item.attrib.get('originalTitle') + except AttributeError: + # compilation not set + artists = item.attrib.get('originalTitle', + item.attrib.get('grandparentTitle')) tracknumber = int(item.attrib.get('index', 0)) disc = int(item.attrib.get('parentIndex', 1)) if disc == 1: @@ -1604,9 +1613,13 @@ class Music(Items): year = API.getYear() resume, duration = API.getRuntime() rating = userdata['UserRating'] - - hasEmbeddedCover = False comment = None + # Moods + moods = [] + for entry in item: + if entry.tag == 'Mood': + moods.append(entry.attrib['tag']) + mood = ' / '.join(moods) # GET THE FILE AND PATH ##### doIndirect = not self.directpath @@ -1644,16 +1657,18 @@ class Music(Items): kodicursor.execute(query, (path, '123', pathid)) # Update the song entry - query = ' '.join(( - "UPDATE song", - "SET idAlbum = ?, strArtists = ?, strGenres = ?, strTitle = ?, iTrack = ?,", - "iDuration = ?, iYear = ?, strFilename = ?, iTimesPlayed = ?, lastplayed = ?,", - "rating = ?, comment = ?", - "WHERE idSong = ?" - )) + query = ''' + UPDATE song + SET idAlbum = ?, strArtists = ?, strGenres = ?, strTitle = ?, + iTrack = ?, iDuration = ?, iYear = ?, strFilename = ?, + iTimesPlayed = ?, lastplayed = ?, rating = ?, comment = ?, + mood = ? + WHERE idSong = ? + ''' kodicursor.execute(query, (albumid, artists, genre, title, track, duration, year, filename, playcount, - dateplayed, rating, comment, songid)) + dateplayed, rating, comment, mood, + songid)) # Update the checksum in plex table plex_db.updateReference(itemid, checksum) @@ -1676,7 +1691,9 @@ class Music(Items): if album_name: log.info("Creating virtual music album for song: %s." % itemid) - albumid = self.kodi_db.addAlbum(album_name, API.getProvider('MusicBrainzAlbum')) + albumid = self.kodi_db.addAlbum( + album_name, + API.getProvider('MusicBrainzAlbum')) plex_db.addReference("%salbum%s" % (itemid, albumid), v.PLEX_TYPE_ALBUM, albumid, @@ -1704,54 +1721,51 @@ class Music(Items): except TypeError: # No album found, create a single's album log.info("Failed to add album. Creating singles.") - kodicursor.execute("select coalesce(max(idAlbum),0) from album") + kodicursor.execute( + "select coalesce(max(idAlbum),0) from album") albumid = kodicursor.fetchone()[0] + 1 if v.KODIVERSION >= 16: # Kodi Jarvis - query = ( - ''' - INSERT INTO album(idAlbum, strGenres, iYear, strReleaseType) - + query = ''' + INSERT INTO album( + idAlbum, strGenres, iYear, strReleaseType) VALUES (?, ?, ?, ?) - ''' - ) - kodicursor.execute(query, (albumid, genre, year, "single")) + ''' + kodicursor.execute(query, + (albumid, genre, year, "single")) elif v.KODIVERSION == 15: # Kodi Isengard - query = ( - ''' - INSERT INTO album(idAlbum, strGenres, iYear, dateAdded, strReleaseType) - + query = ''' + INSERT INTO album( + idAlbum, strGenres, iYear, dateAdded, + strReleaseType) VALUES (?, ?, ?, ?, ?) - ''' - ) - kodicursor.execute(query, (albumid, genre, year, dateadded, "single")) + ''' + kodicursor.execute(query, (albumid, genre, year, + dateadded, "single")) else: # Kodi Helix - query = ( - ''' - INSERT INTO album(idAlbum, strGenres, iYear, dateAdded) - + query = ''' + INSERT INTO album( + idAlbum, strGenres, iYear, dateAdded) VALUES (?, ?, ?, ?) - ''' - ) - kodicursor.execute(query, (albumid, genre, year, dateadded)) + ''' + kodicursor.execute(query, (albumid, genre, year, + dateadded)) # Create the song entry - query = ( - ''' + query = ''' INSERT INTO song( - idSong, idAlbum, idPath, strArtists, strGenres, strTitle, iTrack, - iDuration, iYear, strFileName, strMusicBrainzTrackID, iTimesPlayed, lastplayed, - rating, iStartOffset, iEndOffset) - - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + idSong, idAlbum, idPath, strArtists, strGenres, strTitle, + iTrack, iDuration, iYear, strFileName, + strMusicBrainzTrackID, iTimesPlayed, lastplayed, + rating, iStartOffset, iEndOffset, mood) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ''' - ) kodicursor.execute( query, (songid, albumid, pathid, artists, genre, title, track, duration, year, filename, musicBrainzId, playcount, - dateplayed, rating, 0, 0)) + dateplayed, rating, 0, 0, mood)) # Create the reference in plex table plex_db.addReference(itemid, @@ -1764,14 +1778,11 @@ class Music(Items): view_id=viewid) # Link song to album - query = ( - ''' + query = ''' INSERT OR REPLACE INTO albuminfosong( idAlbumInfoSong, idAlbumInfo, iTrack, strTitle, iDuration) - VALUES (?, ?, ?, ?, ?) - ''' - ) + ''' kodicursor.execute(query, (songid, albumid, track, title, duration)) # Link song to artists @@ -1799,29 +1810,27 @@ class Music(Items): finally: if v.KODIVERSION >= 17: # Kodi Krypton - query = ( - ''' - INSERT OR REPLACE INTO song_artist(idArtist, idSong, idRole, iOrder, strArtist) + query = ''' + INSERT OR REPLACE INTO song_artist( + idArtist, idSong, idRole, iOrder, strArtist) VALUES (?, ?, ?, ?, ?) - ''' - ) - kodicursor.execute(query,(artistid, songid, 1, index, artist_name)) + ''' + kodicursor.execute(query, (artistid, songid, 1, index, + artist_name)) # May want to look into only doing this once? - query = ( - ''' + query = ''' INSERT OR REPLACE INTO role(idRole, strRole) VALUES (?, ?) - ''' - ) + ''' kodicursor.execute(query, (1, 'Composer')) else: - query = ( - ''' - INSERT OR REPLACE INTO song_artist(idArtist, idSong, iOrder, strArtist) + query = ''' + INSERT OR REPLACE INTO song_artist( + idArtist, idSong, iOrder, strArtist) VALUES (?, ?, ?, ?) - ''' - ) - kodicursor.execute(query, (artistid, songid, index, artist_name)) + ''' + kodicursor.execute(query, (artistid, songid, index, + artist_name)) # Verify if album artist exists album_artists = [] @@ -1843,31 +1852,28 @@ class Music(Items): artist_edb = plex_db.getItem_byId(artist_eid) artistid = artist_edb[0] finally: - query = ( - ''' - INSERT OR REPLACE INTO album_artist(idArtist, idAlbum, strArtist) + query = ''' + INSERT OR REPLACE INTO album_artist( + idArtist, idAlbum, strArtist) VALUES (?, ?, ?) - ''' - ) + ''' kodicursor.execute(query, (artistid, albumid, artist_name)) # Update discography if item.get('Album'): - query = ( - ''' - INSERT OR REPLACE INTO discography(idArtist, strAlbum, strYear) + query = ''' + INSERT OR REPLACE INTO discography( + idArtist, strAlbum, strYear) VALUES (?, ?, ?) - ''' - ) + ''' kodicursor.execute(query, (artistid, item['Album'], 0)) # else: if False: album_artists = " / ".join(album_artists) - query = ' '.join(( - - "SELECT strArtists", - "FROM album", - "WHERE idAlbum = ?" - )) + query = ''' + SELECT strArtists + FROM album + WHERE idAlbum = ? + ''' kodicursor.execute(query, (albumid,)) result = kodicursor.fetchone() if result and result[0] != album_artists: @@ -1886,18 +1892,16 @@ class Music(Items): kodicursor.execute(query, (album_artists, albumid)) # Add genres - self.kodi_db.addMusicGenres(songid, genres, "song") + if genres: + self.kodi_db.addMusicGenres(songid, genres, v.KODI_TYPE_SONG) # Update artwork allart = API.getAllArtwork(parentInfo=True) - if hasEmbeddedCover: - allart["Primary"] = "image://music@" + artwork.single_urlencode( playurl ) - artwork.addArtwork(allart, songid, "song", kodicursor) + artwork.addArtwork(allart, songid, v.KODI_TYPE_SONG, kodicursor) - # if item.get('AlbumId') is None: if item.get('parentKey') is None: # Update album artwork - artwork.addArtwork(allart, albumid, "album", kodicursor) + artwork.addArtwork(allart, albumid, v.KODI_TYPE_ALBUM, kodicursor) def remove(self, itemid): # Remove kodiid, fileid, pathid, plex reference diff --git a/resources/lib/library_sync/__init__.py b/resources/lib/library_sync/__init__.py new file mode 100644 index 00000000..b93054b3 --- /dev/null +++ b/resources/lib/library_sync/__init__.py @@ -0,0 +1 @@ +# Dummy file to make this directory a package. diff --git a/resources/lib/library_sync/fanart.py b/resources/lib/library_sync/fanart.py new file mode 100644 index 00000000..7f9fc074 --- /dev/null +++ b/resources/lib/library_sync/fanart.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +from logging import getLogger +from threading import Thread +from Queue import Empty + +from xbmc import sleep + +from utils import ThreadMethodsAdditionalStop, ThreadMethods, window, \ + ThreadMethodsAdditionalSuspend +import plexdb_functions as plexdb +import itemtypes +import variables as v + +############################################################################### + +log = getLogger("PLEX."+__name__) + +############################################################################### + + +@ThreadMethodsAdditionalSuspend('suspend_LibraryThread') +@ThreadMethodsAdditionalStop('plex_shouldStop') +@ThreadMethods +class Process_Fanart_Thread(Thread): + """ + Threaded download of additional fanart in the background + + Input: + queue Queue.Queue() object that you will need to fill with + dicts of the following form: + { + 'plex_id': the Plex id as a string + 'plex_type': the Plex media type, e.g. 'movie' + 'refresh': True/False if True, will overwrite any 3rd party + fanart. If False, will only get missing + } + """ + def __init__(self, queue): + self.queue = queue + Thread.__init__(self) + + def run(self): + """ + Catch all exceptions and log them + """ + try: + self.__run() + except Exception as e: + log.error('Exception %s' % e) + import traceback + log.error("Traceback:\n%s" % traceback.format_exc()) + + def __run(self): + """ + Do the work + """ + log.debug("---===### Starting FanartSync ###===---") + threadStopped = self.threadStopped + threadSuspended = self.threadSuspended + queue = self.queue + while not threadStopped(): + # In the event the server goes offline + while threadSuspended() or window('plex_dbScan'): + # Set in service.py + if threadStopped(): + # Abort was requested while waiting. We should exit + log.info("---===### Stopped FanartSync ###===---") + return + sleep(1000) + # grabs Plex item from queue + try: + item = queue.get(block=False) + except Empty: + sleep(200) + continue + + log.debug('Get additional fanart for Plex id %s' % item['plex_id']) + with getattr(itemtypes, + v.ITEMTYPE_FROM_PLEXTYPE[item['plex_type']])() as cls: + result = cls.getfanart(item['plex_id'], + refresh=item['refresh']) + if result is True: + log.debug('Done getting fanart for Plex id %s' + % item['plex_id']) + with plexdb.Get_Plex_DB() as plex_db: + plex_db.set_fanart_synched(item['plex_id']) + queue.task_done() + log.debug("---===### Stopped FanartSync ###===---") diff --git a/resources/lib/library_sync/get_metadata.py b/resources/lib/library_sync/get_metadata.py new file mode 100644 index 00000000..5fd25859 --- /dev/null +++ b/resources/lib/library_sync/get_metadata.py @@ -0,0 +1,140 @@ +# -*- coding: utf-8 -*- +from logging import getLogger +from threading import Thread +from Queue import Empty + +from xbmc import sleep + +from utils import ThreadMethodsAdditionalStop, ThreadMethods, window +from PlexFunctions import GetPlexMetadata, GetAllPlexChildren +import sync_info + +############################################################################### + +log = getLogger("PLEX."+__name__) + +############################################################################### + + +@ThreadMethodsAdditionalStop('suspend_LibraryThread') +@ThreadMethods +class Threaded_Get_Metadata(Thread): + """ + Threaded download of Plex XML metadata for a certain library item. + Fills the out_queue with the downloaded etree XML objects + + Input: + queue Queue.Queue() object that you'll need to fill up + with Plex itemIds + out_queue Queue() object where this thread will store + the downloaded metadata XMLs as etree objects + """ + def __init__(self, queue, out_queue): + self.queue = queue + self.out_queue = out_queue + Thread.__init__(self) + + def terminate_now(self): + """ + Needed to terminate this thread, because there might be items left in + the queue which could cause other threads to hang + """ + while not self.queue.empty(): + # Still try because remaining item might have been taken + try: + self.queue.get(block=False) + except Empty: + sleep(10) + continue + else: + self.queue.task_done() + if self.threadStopped(): + # Shutdown from outside requested; purge out_queue as well + while not self.out_queue.empty(): + # Still try because remaining item might have been taken + try: + self.out_queue.get(block=False) + except Empty: + sleep(10) + continue + else: + self.out_queue.task_done() + + def run(self): + """ + Catch all exceptions and log them + """ + try: + self.__run() + except Exception as e: + log.error('Exception %s' % e) + import traceback + log.error("Traceback:\n%s" % traceback.format_exc()) + + def __run(self): + """ + Do the work + """ + log.debug('Starting get metadata thread') + # cache local variables because it's faster + queue = self.queue + out_queue = self.out_queue + threadStopped = self.threadStopped + while threadStopped() is False: + # grabs Plex item from queue + try: + item = queue.get(block=False) + # Empty queue + except Empty: + sleep(20) + continue + # Download Metadata + xml = GetPlexMetadata(item['itemId']) + if xml is None: + # Did not receive a valid XML - skip that item for now + log.error("Could not get metadata for %s. Skipping that item " + "for now" % item['itemId']) + # Increase BOTH counters - since metadata won't be processed + with sync_info.LOCK: + sync_info.GET_METADATA_COUNT += 1 + sync_info.PROCESS_METADATA_COUNT += 1 + queue.task_done() + continue + elif xml == 401: + log.error('HTTP 401 returned by PMS. Too much strain? ' + 'Cancelling sync for now') + window('plex_scancrashed', value='401') + # Kill remaining items in queue (for main thread to cont.) + queue.task_done() + break + + item['XML'] = xml + if item.get('get_children') is True: + children_xml = GetAllPlexChildren(item['itemId']) + try: + children_xml[0].attrib + except (TypeError, IndexError, AttributeError): + log.error('Could not get children for Plex id %s' + % item['itemId']) + else: + item['children'] = [] + for child in children_xml: + child_xml = GetPlexMetadata(child.attrib['ratingKey']) + try: + child_xml[0].attrib + except (TypeError, IndexError, AttributeError): + log.error('Could not get child for Plex id %s' + % child.attrib['ratingKey']) + else: + item['children'].append(child_xml[0]) + + # place item into out queue + out_queue.put(item) + # Keep track of where we are at + with sync_info.LOCK: + sync_info.GET_METADATA_COUNT += 1 + # signals to queue job is done + queue.task_done() + # Empty queue in case PKC was shut down (main thread hangs otherwise) + self.terminate_now() + log.debug('Get metadata thread terminated') diff --git a/resources/lib/library_sync/process_metadata.py b/resources/lib/library_sync/process_metadata.py new file mode 100644 index 00000000..e6765b41 --- /dev/null +++ b/resources/lib/library_sync/process_metadata.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +from logging import getLogger +from threading import Thread +from Queue import Empty + +from xbmc import sleep + +from utils import ThreadMethodsAdditionalStop, ThreadMethods +import itemtypes +import sync_info + +############################################################################### + +log = getLogger("PLEX."+__name__) + +############################################################################### + + +@ThreadMethodsAdditionalStop('suspend_LibraryThread') +@ThreadMethods +class Threaded_Process_Metadata(Thread): + """ + Not yet implemented for more than 1 thread - if ever. Only to be called by + ONE thread! + Processes the XML metadata in the queue + + Input: + queue: Queue.Queue() object that you'll need to fill up with + the downloaded XML eTree objects + item_type: as used to call functions in itemtypes.py e.g. 'Movies' => + itemtypes.Movies() + """ + def __init__(self, queue, item_type): + self.queue = queue + self.item_type = item_type + Thread.__init__(self) + + def terminate_now(self): + """ + Needed to terminate this thread, because there might be items left in + the queue which could cause other threads to hang + """ + while not self.queue.empty(): + # Still try because remaining item might have been taken + try: + self.queue.get(block=False) + except Empty: + sleep(10) + continue + else: + self.queue.task_done() + + def run(self): + """ + Catch all exceptions and log them + """ + try: + self.__run() + except Exception as e: + log.error('Exception %s' % e) + import traceback + log.error("Traceback:\n%s" % traceback.format_exc()) + + def __run(self): + """ + Do the work + """ + log.debug('Processing thread started') + # Constructs the method name, e.g. itemtypes.Movies + item_fct = getattr(itemtypes, self.item_type) + # cache local variables because it's faster + queue = self.queue + threadStopped = self.threadStopped + with item_fct() as item_class: + while threadStopped() is False: + # grabs item from queue + try: + item = queue.get(block=False) + except Empty: + sleep(20) + continue + # Do the work + item_method = getattr(item_class, item['method']) + if item.get('children') is not None: + item_method(item['XML'][0], + viewtag=item['viewName'], + viewid=item['viewId'], + children=item['children']) + else: + item_method(item['XML'][0], + viewtag=item['viewName'], + viewid=item['viewId']) + # Keep track of where we are at + try: + log.debug('found child: %s' + % item['children'].attrib) + except: + pass + with sync_info.LOCK: + sync_info.PROCESS_METADATA_COUNT += 1 + sync_info.PROCESSING_VIEW_NAME = item['title'] + queue.task_done() + self.terminate_now() + log.debug('Processing thread terminated') diff --git a/resources/lib/library_sync/sync_info.py b/resources/lib/library_sync/sync_info.py new file mode 100644 index 00000000..df14e433 --- /dev/null +++ b/resources/lib/library_sync/sync_info.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +from logging import getLogger +from threading import Thread, Lock + +from xbmc import sleep + +from utils import ThreadMethodsAdditionalStop, ThreadMethods, language as lang + +############################################################################### + +log = getLogger("PLEX."+__name__) + +GET_METADATA_COUNT = 0 +PROCESS_METADATA_COUNT = 0 +PROCESSING_VIEW_NAME = '' +LOCK = Lock() + +############################################################################### + + +@ThreadMethodsAdditionalStop('suspend_LibraryThread') +@ThreadMethods +class Threaded_Show_Sync_Info(Thread): + """ + Threaded class to show the Kodi statusbar of the metadata download. + + Input: + dialog xbmcgui.DialogProgressBG() object to show progress + total: Total number of items to get + """ + def __init__(self, dialog, total, item_type): + self.total = total + self.dialog = dialog + self.item_type = item_type + Thread.__init__(self) + + def run(self): + """ + Catch all exceptions and log them + """ + try: + self.__run() + except Exception as e: + log.error('Exception %s' % e) + import traceback + log.error("Traceback:\n%s" % traceback.format_exc()) + + def __run(self): + """ + Do the work + """ + log.debug('Show sync info thread started') + # cache local variables because it's faster + total = self.total + dialog = self.dialog + threadStopped = self.threadStopped + dialog.create("%s: Sync %s: %s items" + % (lang(29999), self.item_type, str(total)), + "Starting") + + total = 2 * total + totalProgress = 0 + while threadStopped() is False: + with LOCK: + get_progress = GET_METADATA_COUNT + process_progress = PROCESS_METADATA_COUNT + viewName = PROCESSING_VIEW_NAME + totalProgress = get_progress + process_progress + try: + percentage = int(float(totalProgress) / float(total)*100.0) + except ZeroDivisionError: + percentage = 0 + dialog.update(percentage, + message="%s downloaded. %s processed: %s" + % (get_progress, + process_progress, + viewName)) + # Sleep for x milliseconds + sleep(200) + dialog.close() + log.debug('Show sync info thread terminated') diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 2db99558..c22074f7 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -3,7 +3,7 @@ ############################################################################### import logging -from threading import Thread, Lock +from threading import Thread import Queue from random import shuffle @@ -28,6 +28,10 @@ import variables as v from PlexFunctions import GetPlexMetadata, GetAllPlexLeaves, scrobble, \ GetPlexSectionResults, GetAllPlexChildren, GetPMSStatus import PlexAPI +from library_sync.get_metadata import Threaded_Get_Metadata +from library_sync.process_metadata import Threaded_Process_Metadata +import library_sync.sync_info as sync_info +from library_sync.fanart import Process_Fanart_Thread ############################################################################### @@ -36,282 +40,6 @@ log = logging.getLogger("PLEX."+__name__) ############################################################################### -@ThreadMethodsAdditionalStop('suspend_LibraryThread') -@ThreadMethods -class ThreadedGetMetadata(Thread): - """ - Threaded download of Plex XML metadata for a certain library item. - Fills the out_queue with the downloaded etree XML objects - - Input: - queue Queue.Queue() object that you'll need to fill up - with Plex itemIds - out_queue Queue() object where this thread will store - the downloaded metadata XMLs as etree objects - lock Lock(), used for counting where we are - """ - def __init__(self, queue, out_queue, lock, processlock): - self.queue = queue - self.out_queue = out_queue - self.lock = lock - self.processlock = processlock - Thread.__init__(self) - - def terminateNow(self): - while not self.queue.empty(): - # Still try because remaining item might have been taken - try: - self.queue.get(block=False) - except Queue.Empty: - xbmc.sleep(10) - continue - else: - self.queue.task_done() - if self.threadStopped(): - # Shutdown from outside requested; purge out_queue as well - while not self.out_queue.empty(): - # Still try because remaining item might have been taken - try: - self.out_queue.get(block=False) - except Queue.Empty: - xbmc.sleep(10) - continue - else: - self.out_queue.task_done() - - def run(self): - # cache local variables because it's faster - queue = self.queue - out_queue = self.out_queue - lock = self.lock - processlock = self.processlock - threadStopped = self.threadStopped - global getMetadataCount - global processMetadataCount - while threadStopped() is False: - # grabs Plex item from queue - try: - updateItem = queue.get(block=False) - # Empty queue - except Queue.Empty: - xbmc.sleep(10) - continue - # Download Metadata - plexXML = GetPlexMetadata(updateItem['itemId']) - if plexXML is None: - # Did not receive a valid XML - skip that item for now - log.warn("Could not get metadata for %s. Skipping that item " - "for now" % updateItem['itemId']) - # Increase BOTH counters - since metadata won't be processed - with lock: - getMetadataCount += 1 - with processlock: - processMetadataCount += 1 - queue.task_done() - continue - elif plexXML == 401: - log.warn('HTTP 401 returned by PMS. Too much strain? ' - 'Cancelling sync for now') - window('plex_scancrashed', value='401') - # Kill remaining items in queue (for main thread to cont.) - queue.task_done() - break - - updateItem['XML'] = plexXML - # place item into out queue - out_queue.put(updateItem) - # Keep track of where we are at - with lock: - getMetadataCount += 1 - # signals to queue job is done - queue.task_done() - # Empty queue in case PKC was shut down (main thread hangs otherwise) - self.terminateNow() - log.debug('Download thread terminated') - - -@ThreadMethodsAdditionalStop('suspend_LibraryThread') -@ThreadMethods -class ThreadedProcessMetadata(Thread): - """ - Not yet implemented - if ever. Only to be called by ONE thread! - Processes the XML metadata in the queue - - Input: - queue: Queue.Queue() object that you'll need to fill up with - the downloaded XML eTree objects - itemType: as used to call functions in itemtypes.py - e.g. 'Movies' => itemtypes.Movies() - lock: Lock(), used for counting where we are - """ - def __init__(self, queue, itemType, lock): - self.queue = queue - self.lock = lock - self.itemType = itemType - Thread.__init__(self) - - def terminateNow(self): - while not self.queue.empty(): - # Still try because remaining item might have been taken - try: - self.queue.get(block=False) - except Queue.Empty: - xbmc.sleep(10) - continue - else: - self.queue.task_done() - - def run(self): - # Constructs the method name, e.g. itemtypes.Movies - itemFkt = getattr(itemtypes, self.itemType) - # cache local variables because it's faster - queue = self.queue - lock = self.lock - threadStopped = self.threadStopped - global processMetadataCount - global processingViewName - with itemFkt() as item: - while threadStopped() is False: - # grabs item from queue - try: - updateItem = queue.get(block=False) - except Queue.Empty: - xbmc.sleep(10) - continue - # Do the work - plexitem = updateItem['XML'] - method = updateItem['method'] - viewName = updateItem['viewName'] - viewId = updateItem['viewId'] - title = updateItem['title'] - itemSubFkt = getattr(item, method) - # Get the one child entry in the xml and process - for child in plexitem: - itemSubFkt(child, - viewtag=viewName, - viewid=viewId) - # Keep track of where we are at - with lock: - processMetadataCount += 1 - processingViewName = title - # signals to queue job is done - queue.task_done() - # Empty queue in case PKC was shut down (main thread hangs otherwise) - self.terminateNow() - log.debug('Processing thread terminated') - - -@ThreadMethodsAdditionalStop('suspend_LibraryThread') -@ThreadMethods -class ThreadedShowSyncInfo(Thread): - """ - Threaded class to show the Kodi statusbar of the metadata download. - - Input: - dialog xbmcgui.DialogProgressBG() object to show progress - locks = [downloadLock, processLock] Locks() to the other threads - total: Total number of items to get - """ - def __init__(self, dialog, locks, total, itemType): - self.locks = locks - self.total = total - self.dialog = dialog - self.itemType = itemType - Thread.__init__(self) - - def run(self): - # cache local variables because it's faster - total = self.total - dialog = self.dialog - threadStopped = self.threadStopped - downloadLock = self.locks[0] - processLock = self.locks[1] - dialog.create("%s: Sync %s: %s items" - % (lang(29999), self.itemType, str(total)), - "Starting") - global getMetadataCount - global processMetadataCount - global processingViewName - total = 2 * total - totalProgress = 0 - while threadStopped() is False: - with downloadLock: - getMetadataProgress = getMetadataCount - with processLock: - processMetadataProgress = processMetadataCount - viewName = processingViewName - totalProgress = getMetadataProgress + processMetadataProgress - try: - percentage = int(float(totalProgress) / float(total)*100.0) - except ZeroDivisionError: - percentage = 0 - dialog.update(percentage, - message="%s downloaded. %s processed: %s" - % (getMetadataProgress, - processMetadataProgress, - viewName)) - # Sleep for x milliseconds - xbmc.sleep(200) - dialog.close() - log.debug('Dialog Infobox thread terminated') - - -@ThreadMethodsAdditionalSuspend('suspend_LibraryThread') -@ThreadMethodsAdditionalStop('plex_shouldStop') -@ThreadMethods -class ProcessFanartThread(Thread): - """ - Threaded download of additional fanart in the background - - Input: - queue Queue.Queue() object that you will need to fill with - dicts of the following form: - { - 'plex_id': the Plex id as a string - 'plex_type': the Plex media type, e.g. 'movie' - 'refresh': True/False if True, will overwrite any 3rd party - fanart. If False, will only get missing - } - """ - def __init__(self, queue): - self.queue = queue - Thread.__init__(self) - - def run(self): - threadStopped = self.threadStopped - threadSuspended = self.threadSuspended - queue = self.queue - log.info("---===### Starting FanartSync ###===---") - while not threadStopped(): - # In the event the server goes offline - while threadSuspended() or window('plex_dbScan'): - # Set in service.py - if threadStopped(): - # Abort was requested while waiting. We should exit - log.info("---===### Stopped FanartSync ###===---") - return - xbmc.sleep(1000) - # grabs Plex item from queue - try: - item = queue.get(block=False) - except Queue.Empty: - xbmc.sleep(200) - continue - - log.debug('Get additional fanart for Plex id %s' % item['plex_id']) - with getattr(itemtypes, - v.ITEMTYPE_FROM_PLEXTYPE[item['plex_type']])() as cls: - result = cls.getfanart(item['plex_id'], - refresh=item['refresh']) - if result is True: - log.debug('Done getting fanart for Plex id %s' - % item['plex_id']) - with plexdb.Get_Plex_DB() as plex_db: - plex_db.set_fanart_synched(item['plex_id']) - queue.task_done() - log.info("---===### Stopped FanartSync ###===---") - - @ThreadMethodsAdditionalSuspend('suspend_LibraryThread') @ThreadMethodsAdditionalStop('plex_shouldStop') @ThreadMethods @@ -330,7 +58,7 @@ class LibrarySync(Thread): self.sessionKeys = [] self.fanartqueue = Queue.Queue() if settings('FanartTV') == 'true': - self.fanartthread = ProcessFanartThread(self.fanartqueue) + self.fanartthread = Process_Fanart_Thread(self.fanartqueue) # How long should we wait at least to process new/changed PMS items? self.saftyMargin = int(settings('backgroundsync_saftyMargin')) @@ -700,8 +428,8 @@ class LibrarySync(Thread): viewid=folderid, delete=True) # Added new playlist - if (foldername not in playlists and - mediatype in (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)): + if (foldername not in playlists and mediatype in + (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)): playlistXSP(mediatype, foldername, folderid, @@ -726,8 +454,8 @@ class LibrarySync(Thread): else: # Validate the playlist exists or recreate it if mediatype != v.PLEX_TYPE_ARTIST: - if (foldername not in playlists and - mediatype in (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)): + if (foldername not in playlists and mediatype in + (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW)): playlistXSP(mediatype, foldername, folderid, @@ -777,7 +505,8 @@ class LibrarySync(Thread): for view in sections: itemType = view.attrib['type'] - if itemType in (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW, v.PLEX_TYPE_PHOTO): # NOT artist for now + if (itemType in + (v.PLEX_TYPE_MOVIE, v.PLEX_TYPE_SHOW, v.PLEX_TYPE_PHOTO)): self.sorted_views.append(view.attrib['title']) log.debug('Sorted views: %s' % self.sorted_views) @@ -859,7 +588,8 @@ class LibrarySync(Thread): with itemtypes.Music() as music: music.remove(item['plex_id']) - def GetUpdatelist(self, xml, itemType, method, viewName, viewId): + def GetUpdatelist(self, xml, itemType, method, viewName, viewId, + get_children=False): """ THIS METHOD NEEDS TO BE FAST! => e.g. no API calls @@ -872,6 +602,8 @@ class LibrarySync(Thread): see itemtypes.py viewName: Name of the Plex view (e.g. 'My TV shows') viewId: Id/Key of Plex library (e.g. '1') + get_children: will get Plex children of the item if True, + e.g. for music albums Output: self.updatelist, self.allPlexElementsId self.updatelist APPENDED(!!) list itemids (Plex Keys as @@ -906,7 +638,8 @@ class LibrarySync(Thread): 'viewName': viewName, 'viewId': viewId, 'title': item.attrib.get('title', 'Missing Title'), - 'mediaType': item.attrib.get('type') + 'mediaType': item.attrib.get('type'), + 'get_children': get_children }) self.just_processed[itemId] = now return @@ -932,7 +665,8 @@ class LibrarySync(Thread): 'viewName': viewName, 'viewId': viewId, 'title': item.attrib.get('title', 'Missing Title'), - 'mediaType': item.attrib.get('type') + 'mediaType': item.attrib.get('type'), + 'get_children': get_children }) self.just_processed[itemId] = now else: @@ -951,7 +685,8 @@ class LibrarySync(Thread): 'viewName': viewName, 'viewId': viewId, 'title': item.attrib.get('title', 'Missing Title'), - 'mediaType': item.attrib.get('type') + 'mediaType': item.attrib.get('type'), + 'get_children': get_children }) self.just_processed[itemId] = now @@ -976,49 +711,38 @@ class LibrarySync(Thread): log.info("Starting sync threads") getMetadataQueue = Queue.Queue() processMetadataQueue = Queue.Queue(maxsize=100) - getMetadataLock = Lock() - processMetadataLock = Lock() # To keep track - global getMetadataCount - getMetadataCount = 0 - global processMetadataCount - processMetadataCount = 0 - global processingViewName - processingViewName = '' + sync_info.GET_METADATA_COUNT = 0 + sync_info.PROCESS_METADATA_COUNT = 0 + sync_info.PROCESSING_VIEW_NAME = '' # Populate queue: GetMetadata for updateItem in self.updatelist: getMetadataQueue.put(updateItem) # Spawn GetMetadata threads for downloading threads = [] for i in range(min(self.syncThreadNumber, itemNumber)): - thread = ThreadedGetMetadata(getMetadataQueue, - processMetadataQueue, - getMetadataLock, - processMetadataLock) + thread = Threaded_Get_Metadata(getMetadataQueue, + processMetadataQueue) thread.setDaemon(True) thread.start() threads.append(thread) log.info("%s download threads spawned" % len(threads)) # Spawn one more thread to process Metadata, once downloaded - thread = ThreadedProcessMetadata(processMetadataQueue, - itemType, - processMetadataLock) + thread = Threaded_Process_Metadata(processMetadataQueue, + itemType) thread.setDaemon(True) thread.start() threads.append(thread) - log.info("Processing thread spawned") # Start one thread to show sync progress ONLY for new PMS items if self.new_items_only is True and window('dbSyncIndicator') == 'true': dialog = xbmcgui.DialogProgressBG() - thread = ThreadedShowSyncInfo( + thread = sync_info.Threaded_Show_Sync_Info( dialog, - [getMetadataLock, processMetadataLock], itemNumber, itemType) thread.setDaemon(True) thread.start() threads.append(thread) - log.info("Kodi Infobox thread spawned") # Wait until finished getMetadataQueue.join() @@ -1322,6 +1046,8 @@ class LibrarySync(Thread): return True def ProcessMusic(self, views, kind, urlArgs, method): + # For albums, we need to look at the album's songs simultaneously + get_children = True if kind == v.PLEX_TYPE_ALBUM else False # Get a list of items already existing in Kodi db if self.compare: with plexdb.Get_Plex_DB() as plex_db: @@ -1347,7 +1073,8 @@ class LibrarySync(Thread): 'Music', method, view['name'], - view['id']) + view['id'], + get_children=get_children) if self.compare: # Manual sync, process deletes with itemtypes.Music() as Music: From b0fe3cba2465ebd014f5a9c681ced77764e9ee85 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 2 Apr 2017 20:10:10 +0200 Subject: [PATCH 64/66] Cleanup stream selection --- resources/lib/PlexAPI.py | 58 ++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index fec9e228..9036b82f 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -30,7 +30,6 @@ http://stackoverflow.com/questions/111945/is-there-any-way-to-do-http-put-in-pyt (and others...) """ -import os import logging from time import time import urllib2 @@ -40,6 +39,7 @@ import xml.etree.ElementTree as etree from re import compile as re_compile, sub from json import dumps from urllib import urlencode, quote_plus, unquote +from os import path as os_path import xbmcgui from xbmc import sleep, executebuiltin @@ -2187,32 +2187,38 @@ class API(): # Several streams/files available. dialoglist = [] for entry in self.item.findall('./Media'): - fileName = '' - audioLanguage = '' - # Get additional info (filename / languages) - mediaPartEntry = self.item.find('./Media/Part') - if mediaPartEntry is not None: - # Filename - if 'file' in mediaPartEntry.attrib: - fileName = os.path.basename(mediaPartEntry.attrib['file']) - - # Languages - subtitle does not seem to be directly included in this stream info - mediaPartStreamEntry = self.item.find('./Media/Part/Stream') - if mediaPartStreamEntry is not None: - # Audio language - if 'language' in mediaPartStreamEntry.attrib: - audioLanguage = mediaPartStreamEntry.attrib['language'] - - dialoglist.append( - "%sp %s - %s (%s) (%s) %s" % - (entry.attrib.get('videoResolution', 'unknown'), - entry.attrib.get('videoCodec', 'unknown'), - entry.attrib.get('audioProfile', 'unknown'), - entry.attrib.get('audioCodec', 'unknown'), - audioLanguage, - fileName) - ) + filename = None + if 'file' in entry[0].attrib: + filename = os_path.basename(entry[0].attrib['file']) + # Languages of audio streams + languages = [] + for stream in entry[0]: + if (stream.attrib['streamType'] == '1' and + 'language' in stream.attrib): + languages.append(stream.attrib['language']) + languages = ', '.join(languages) + if filename: + option = tryEncode(filename) + if languages: + if option: + option = '%s (%s): ' % (option, tryEncode(languages)) + else: + option = '%s: ' % tryEncode(languages) + if 'videoResolution' in entry.attrib: + option = '%s%sp ' % (option, + entry.attrib.get('videoResolution')) + if 'videoCodec' in entry.attrib: + option = '%s%s' % (option, + entry.attrib.get('videoCodec')) + option = option.strip() + ' - ' + if 'audioProfile' in entry.attrib: + option = '%s%s ' % (option, + entry.attrib.get('audioProfile')) + if 'audioCodec' in entry.attrib: + option = '%s%s ' % (option, + entry.attrib.get('audioCodec')) + dialoglist.append(option) media = xbmcgui.Dialog().select('Select stream', dialoglist) else: media = 0 From f7262e737fa531b754eb7be18a4df7568eb37f4a Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 7 Apr 2017 11:32:53 +0200 Subject: [PATCH 65/66] Update Dutch translation --- resources/language/Dutch/strings.xml | 86 ++++++++++++++-------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/resources/language/Dutch/strings.xml b/resources/language/Dutch/strings.xml index 981dfd47..ea18177a 100644 --- a/resources/language/Dutch/strings.xml +++ b/resources/language/Dutch/strings.xml @@ -4,13 +4,13 @@ PlexKodiConnect Serveradres (IP) Voorkeurs methode voor afspelen - Logniveau + Log niveau Gebruikersnaam: Wachtwoord: Netwerk gebruikersnaam: Netwerk wachtwoord: Transcode: - Schakel Performance Profiling in + Schakel prestatie profilering in Lokaal caching systeem OK Nooit weergeven @@ -26,7 +26,7 @@ Bericht weergeven als PMS offline gaat Poortnummer - Dit is mijn Plex Media Server + Ik beheer deze Plex Media Server Aantal recente films tonen: Aantal recente TV-afleveringen tonen: Aantal recente muziekalbums tonen: @@ -171,7 +171,7 @@ BoxSets Trailers Muziekvideo 's - Foto 's + Foto's Onbekeken films Film Genres Filmstudios @@ -217,7 +217,7 @@ Willekeurige Items Aanbevolen - Extra 's + Extra's Synchroniseer themamuziek Synchroniseer extra Fanart Synchroniseer Film BoxSets @@ -230,19 +230,19 @@ Forceer Codecs Transcoden Inschakelen van Netflix stijl volgende notificatie - - Het aantal seconden voor het einde waneer de notificatie te tonen + - Het aantal seconden voor het einde wanneer de notificatie te tonen Toon Emby Infodialoog bij Afspelen/Selecteer actie Inschakelen van server verbinding bericht bij het opstarten - Recent toegevoegde Thuis-video 's + Recent toegevoegde Thuis-video's Recent toegevoegde foto's - Favorite Home Videos - Favorite Photos - Favorite Albums + Favoriete Thuis-Video's + Favoriete foto's + Favoriete Albums Recent toegevoegde videoclips Actieve videoclips - Onbekeken videoclips + Ongeziene videoclips Actieve @@ -254,9 +254,9 @@ Seizoenen Afleveringen Muziek artiesten - Muziekalbums - Muziekvideo 's - Muziektracks + Muziek albums + Muziek video 's + Muziek tracks Kanalen @@ -301,7 +301,7 @@ Geen confirmatie bij het verwijderen van Plex (gebruik op eigen risico) Terugspringen bij verder kijken (in seconden) Forceer transcoden h265/HEVC - Muzie metagegevens opties (niet compatible met direct stream) + Muziek metagegevens opties (niet compatibel met direct stream) Muziek ratings direct uit bestanden lezen Converteer muziek ratings naar Emby ratings Toestaan van aanpassen rating in bestanden @@ -310,10 +310,10 @@ Opstartvertraging (in seconden) Server herstart bericht inschakelen Schakel kennisgeving in nieuwe inhoud - Duur van de bibliotheek popup (in seconden) - Duur van de bibliotheek popup (in seconden) + Duur van de bibliotheek pop-up (in seconden) + Duur van de bibliotheek pop-up (in seconden) Serverberichten - [COLOR yellow]Genereer nieuw uniek apparaat id (bijvoorbeeld bij het klonen van Kodi)[/COLOR] + [COLOR yellow]Genereer nieuw uniek apparaat ID (bijvoorbeeld bij het klonen van Kodi)[/COLOR] Gebruiker moet bij elke Kodi herstart opnieuw inloggen BIJ AANPASSINGEN KODI HERSTARTEN Volledige re-sync nodig @@ -330,8 +330,8 @@ Verbindingsfout Server is onbereikbaar Server is online - items toegevoegd aan playlist - items toegevoegd aan playlist + items toegevoegd aan afspeellijst + items toegevoegd aan afspeellijst De server wordt opnieuw opgestart Toegang is verleend Wachtwoord voor gebruiker: @@ -346,10 +346,10 @@ Verzamel films van: Verzamel boxsets Verzamel muziek video's van: - Verzamel tv-shows van: + Verzamel tv-series van: Verzamelen: - Detected the database needs to be recreated for this version of Emby for Kodi. Proceed? - Emby for Kodi may not work correctly until the database is reset. + Gedetecteerd dat de database opnieuw moet worden gemaakt voor deze versie van Emby voor Kodi. Wilt u doorgaan? + Emby voor Kodi werkt mogelijk niet correct totdat de database is ge-reset. Database sync geannuleerd. De huidige versie van Kodi is niet ondersteund. voltooid in: Vergelijk films met: @@ -379,25 +379,25 @@ Nog niet ingelogd op de Plex server Log in op plex.tv. Problemen bij het verbinden met de server. Kies een andere server? - Plex muziek library uitzetten? (Het is sterk aangeraden om Plex muziek alleen met directe paden te gebruiken bij een grote library. Kodie kan anders vastlopen) + Plex muziek bibliotheek uitzetten? (Het is sterk aanbevolen om Plex muziek alleen met directe paden te gebruiken bij een grote bibliotheek. Kodi kan anders vastlopen) PKC plugin instellingen aanpassen? Kodi moet hierna herstart worden! [COLOR yellow]Lokale database herstellen (forceer verversen van alle inhoud)[/COLOR] [COLOR red]Gedeeltelijke of volledige reset van database en PKC[/COLOR] [COLOR yellow]Alle afbeeldingen van Kodi nu aan de cache toevoegen[/COLOR] - [COLOR yellow]Sync Emby Theme Media to Kodi[/COLOR] + [Kleur geel] Kodi[/COLOR] Synchroniseer Emby thema muziek naar Kodi lokaal Authenticatie mislukt. Ingelogd bij plex.tv? - Automatisch inloggen op plex.tv bij het opstarten + Automatisch inloggen bij plex.tv bij het opstarten Constante achtergrond sync inschakelen Afspeelmodus LET OP! Als u "Native" modus kiest, zullen sommige Plex mogelijkheden niet beschikbaar zijn. Bijvoorbeeld: Plex trailers en opties voor transcoden. ALLE Plex shares moeten gebruik maken van directe paden (bijvoorbeeld smb://myNAS/mymovie.mkv of \\myNAS/mymovie.mkv)! - Netwerk gegevens - Netwerk gegevens toevoegen zodat Kodi bij de inhoud kan? Opmerking: Kodi zal een bericht tonen bij de eerste sync als deze stap overgeslagen word. + Netwerk inloggegevens + Netwerk inloggegevens toevoegen zodat Kodi bij de inhoud kan? Opmerking: Kodi zal een bericht tonen bij de eerste sync als deze stap overgeslagen word. Kodi kan het bestand niet vinden: - Controleer het pad. Waarschijnlijk verkeerde netwerk gegevens of verkeerde paden. Stop synchroniseren? + Controleer het pad. Waarschijnlijk verkeerde netwerk gegevens of verkeerde paden. Stoppen met synchroniseren? Vervang Plex UNC pad \\myNas\mymovie.mkv automatisch met smb paden, smb://myNas/mymovie.mkv? (aanbevolen) Vervang Plex UNC paden \\myNas met smb://myNas @@ -418,19 +418,19 @@ [COLOR yellow]Kies Plex Server uit lijst[/COLOR] Tijd voordat nieuwe/gewijzigde items gesynct worden [s] Achtergrond Sync - Elke X minuten een volledige sync + Elke X minuten een volledige bibliotheek sync remote Plex Server zoeken Gebruikt door Sync en bij Direct Play Aanpassen van paden On Deck van TV-series laat alle series zien - Onlangs Toegevoegd: Voeg show naam toe aan afleveringen + Onlangs Toegevoegd: Voeg serie naam toe aan afleveringen Onlangs Toegevoegd: Voeg seizoen en aflevering nummer toe SxxExx Extra artwork van FanArtTV in de background downloaden? Sync als screensaver gedeactiveerd is Forceer transcoden van Hi10P Onlangs Toegevoegd: Toon ook al bekeken afleveringen - Onlangs Toegevoegd: Toon ook al bekeken films (Ververs Plex playlist/nodes!) + Onlangs Toegevoegd: Toon ook al bekeken films (Ververs Plex afspeellijst/nodes!) Huidige Plex Media Server: [COLOR yellow]Handmatig Plex Media Server adres invoeren[/COLOR] Huidig adres: @@ -438,7 +438,7 @@ Huidige status van de plex.tv: Is Kodi geïnstalleerd op een low-powered apparaat zoals een Raspberry Pi? Zo ja, dan zullen we de druk op Kodi verlagen om de kans op crashen te verminderen. Uiterlijk aanpassingen - TV shows + TV series Gebruik indien mogelijk altijd standaard Plex ondertitels Bij gebruik van meerdere plex libraries van hetzelfde type, bijvoorbeeld "Kinder Films" en "Films voor volwassenen" bekijk dan de Wiki: https://goo.gl/JFtQV9 Aantal PMS items in widgets laten zien (bijv. "On Deck") @@ -448,18 +448,18 @@ Log-out Plex Home gebruiker Instellingen - Netwerk gegevens + Netwerk inloggegevens Vernieuwen van Plex afspeellijsten/nodes Handmatige sync uitvoeren Sync is niet gelukt, de add-on is niet verbonden met de Plex Server. Plex kan uw account vergrendelen bij teveel foutieve login pogingen. Toch doorgaan? - Resetten van PMS verbindingen, een moment geduld a.u.b + PMS verbindingen aan het resetten, een moment geduld a.u.b PKC reset niet gelukt. Herstart Kodi. [COLOR yellow]Verander plex.tv login (aanmelden of afmelden)[/COLOR] Nog niet verbonden met Plex Server Later bekijken is offline - Hoewel aangemeld bij plex.tv, niet geauthorizeerd bij de PMS + Hoewel aangemeld bij plex.tv, niet geauthoriseerd bij de PMS Voer Plex Media Server adres in. Voorbeelden zijn: Ondersteunt uw Plex Media Server SSL-verbindingen? (https in plaats van http)? @@ -468,7 +468,7 @@ verbonden plex.tv aanpassing succesvol [COLOR yellow]Nu zoeken naar missende artwork op FanartTV[/COLOR] - Alleen missende artwork zoeken of alles verniewen? De scan kan lang duren en zal op de achtergrond plaatsvinden. + Alleen missende artwork zoeken of alles vernieuwen? De scan kan lang duren en zal op de achtergrond plaatsvinden. Alles vernieuwen Alleen ontbrekende @@ -482,7 +482,7 @@ Wachtwoord voor gebruiker van plex.tv Kan de gebruiker niet inloggen Probleem met verbinding naar plex.tv. Probeer het later opnieuw - Ga naar https://plex.tv/pin en voer de code in: + Ga naar https://plex.tv/pin en voer de volgende code in: Kan niet aanmelden bij plex.tv. Probeer het later opnieuw : Selecteer gebruiker Voer pincode voor gebruiker @@ -495,21 +495,21 @@ Sync is gecrashed. Herstart Kodi. Meldt dit probleem op het forum Deze versie vereist een nieuwe database. Dit kan enige tijd duren. Doorgaan? werkt mogelijk niet correct totdat de database opnieuw wordt ingesteld. - Database syncing proces geannuleerd. Huidige Kodi versie wordt niet ondersteund. Controleer uw logbestanden voor meer info. + Database synchroniseer proces geannuleerd. Huidige Kodi versie wordt niet ondersteund. Controleer uw logbestanden voor meer info. Opstarten synchronisatie proces mislukt herhaaldelijk. Start Kodi opnieuw. Sync is voor nu geannuleerd. Plex afspeellijsten/nodes vernieuwd Plex afspeellijsten/nodes vernieuwen mislukt - Volledige bibliotheek sync klaar + Volledige bibliotheek synchronisatie voltooid Sync diende een aantal bestanden over te slaan. Kodi werkt misschien niet langer stabiel. Gelieve uw Kodi log bestanden op het Plex forum te posten. Plex gaf fouten terug door de gevraagde hoeveelheid data. Verminder het aantal sync threads in de instellingen. Sommige items zijn overgeslagen. - FOUT in bibliotheek sync + FOUT in bibliotheek synchronisatie On Deck Verzamelingen - Lokale database van Kodi resetten? Een hersynchronisatie is nodig en kan enige tijd duren. + Lokale database van Kodi resetten? Een hersynchronisatie is nodig en dit kan enige tijd duren. Kon de database synchronisatie niet stoppen. Probeer het later nog eens. Verwijder artwork cache? (aanbevolen!) Reset alle instellingen van de PlexKodiConnect Addon? (dit is gewoonlijk niet aanbevolen en onnodig!) @@ -517,4 +517,4 @@ Amazon Alexa (spraakherkenning) Aktiveer Alexa Per map bladeren - \ No newline at end of file + From ed2785559c2cad6590f8327a301530030967e2d0 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Fri, 7 Apr 2017 11:33:26 +0200 Subject: [PATCH 66/66] Update German translation --- resources/language/German/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/language/German/strings.xml b/resources/language/German/strings.xml index 185b0db7..708a5272 100644 --- a/resources/language/German/strings.xml +++ b/resources/language/German/strings.xml @@ -236,7 +236,7 @@ Kürzlich hinzugefügte Home Videos Kürzlich hinzugefügte Fotos - Lieblings Heimvideos + Lieblings-Homevideos Lieblingsfotos Lieblings-Alben