diff --git a/addon.xml b/addon.xml index b7a9df67..da8e127b 100644 --- a/addon.xml +++ b/addon.xml @@ -1,14 +1,10 @@ - + - + video audio image @@ -21,6 +17,13 @@ + 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 @@ -37,11 +40,5 @@ 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! - all - GPL v2.0 - https://forums.plex.tv - https://github.com/croneter/PlexKodiConnect - - https://github.com/croneter/PlexKodiConnect - \ No newline at end of file + diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index 69313894..527e90f6 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -517,4 +517,4 @@ Amazon Alexa (Voice Recognition) Activate Alexa Browse by folder - + \ No newline at end of file diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 123c2283..7cce004b 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -117,8 +117,7 @@ def Plex_Node(url, viewOffset, playdirectly=False, node=True): return if viewOffset != '0': try: - viewOffset = int(v.PLEX_TO_KODI_TIMEFACTOR * - float(viewOffset)) + viewOffset = int(v.PLEX_TO_KODI_TIMEFACTOR * float(viewOffset)) except: pass else: @@ -964,17 +963,21 @@ def __build_item(xml_element): listitem = api.CreateListItemFromPlexItem() api.AddStreamInfo(listitem) api.set_listitem_artwork(listitem) - if api.getType() != v.PLEX_TYPE_PHOTO: - url = "plugin://%s/" % v.ADDON_ID + if api.getType() == v.PLEX_TYPE_CLIP: params = { 'mode': "Plex_Node", 'id': xml_element.attrib.get('key'), 'viewOffset': xml_element.attrib.get('viewOffset', '0'), 'plex_type': xml_element.attrib.get('type') } - url = '%s?%s' % (url, urlencode(params)) else: - url = listitem.getProperty('path') + params = { + 'filename': api.getKey(), + 'id': api.getRatingKey(), + 'dbid': listitem.getProperty('dbid') or '', + 'mode': "play" + } + url = "plugin://%s?%s" % (v.ADDON_ID, urlencode(params)) xbmcplugin.addDirectoryItem(handle=HANDLE, url=url, listitem=listitem) diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index 5ab80b6c..61d28b7c 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -260,7 +260,6 @@ def init_Plex_playlist(playlist, plex_id=None, kodi_item=None): except KeyError: log.error('Could not init Plex playlist') return - item.ID = xml[-1].attrib['%sItemID' % playlist.kind] playlist.items.append(item) log.debug('Initialized the playlist on the Plex side: %s' % playlist) diff --git a/resources/settings.xml b/resources/settings.xml index fd50830b..429c7173 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -96,7 +96,7 @@ - +