Merge branch 'develop' into translations

This commit is contained in:
tomkat83 2017-03-09 12:43:59 +01:00
commit 91e3d24658
5 changed files with 21 additions and 22 deletions

View file

@ -1,14 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.plexkodiconnect" <addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="1.6.5" provider-name="croneter">
name="PlexKodiConnect"
version="1.6.5"
provider-name="croneter">
<requires> <requires>
<import addon="xbmc.python" version="2.1.0"/> <import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.requests" version="2.3.0" /> <import addon="script.module.requests" version="2.3.0" />
</requires> </requires>
<extension point="xbmc.python.pluginsource" <extension point="xbmc.python.pluginsource" library="default.py">
library="default.py">
<provides>video audio image</provides> <provides>video audio image</provides>
</extension> </extension>
<extension point="xbmc.service" library="service.py" start="login"> <extension point="xbmc.service" library="service.py" start="login">
@ -21,6 +17,13 @@
</item> </item>
</extension> </extension>
<extension point="xbmc.addon.metadata"> <extension point="xbmc.addon.metadata">
<platform>all</platform>
<language></language>
<license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
<forum>https://forums.plex.tv</forum>
<website>https://github.com/croneter/PlexKodiConnect</website>
<email></email>
<source>https://github.com/croneter/PlexKodiConnect</source>
<summary lang="en">Native Integration of Plex into Kodi</summary> <summary lang="en">Native Integration of Plex into Kodi</summary>
<summary lang="en_gb">Native Integration of Plex into Kodi</summary> <summary lang="en_gb">Native Integration of Plex into Kodi</summary>
<summary lang="en_us">Native Integration of Plex into Kodi</summary> <summary lang="en_us">Native Integration of Plex into Kodi</summary>
@ -37,11 +40,5 @@
<description lang="es">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!</description> <description lang="es">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!</description>
<description lang="dk">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!</description> <description lang="dk">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!</description>
<description lang="nl">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!</description> <description lang="nl">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!</description>
<platform>all</platform>
<license>GPL v2.0</license>
<forum>https://forums.plex.tv</forum>
<website>https://github.com/croneter/PlexKodiConnect</website>
<email></email>
<source>https://github.com/croneter/PlexKodiConnect</source>
</extension> </extension>
</addon> </addon>

View file

@ -517,4 +517,4 @@
<string id="39700">Amazon Alexa (Voice Recognition)</string> <string id="39700">Amazon Alexa (Voice Recognition)</string>
<string id="39701">Activate Alexa</string> <string id="39701">Activate Alexa</string>
<string id="39702">Browse by folder</string> <string id="39702">Browse by folder</string>
</strings> </strings>

View file

@ -117,8 +117,7 @@ def Plex_Node(url, viewOffset, playdirectly=False, node=True):
return return
if viewOffset != '0': if viewOffset != '0':
try: try:
viewOffset = int(v.PLEX_TO_KODI_TIMEFACTOR * viewOffset = int(v.PLEX_TO_KODI_TIMEFACTOR * float(viewOffset))
float(viewOffset))
except: except:
pass pass
else: else:
@ -964,17 +963,21 @@ def __build_item(xml_element):
listitem = api.CreateListItemFromPlexItem() listitem = api.CreateListItemFromPlexItem()
api.AddStreamInfo(listitem) api.AddStreamInfo(listitem)
api.set_listitem_artwork(listitem) api.set_listitem_artwork(listitem)
if api.getType() != v.PLEX_TYPE_PHOTO: if api.getType() == v.PLEX_TYPE_CLIP:
url = "plugin://%s/" % v.ADDON_ID
params = { params = {
'mode': "Plex_Node", 'mode': "Plex_Node",
'id': xml_element.attrib.get('key'), 'id': xml_element.attrib.get('key'),
'viewOffset': xml_element.attrib.get('viewOffset', '0'), 'viewOffset': xml_element.attrib.get('viewOffset', '0'),
'plex_type': xml_element.attrib.get('type') 'plex_type': xml_element.attrib.get('type')
} }
url = '%s?%s' % (url, urlencode(params))
else: 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, xbmcplugin.addDirectoryItem(handle=HANDLE,
url=url, url=url,
listitem=listitem) listitem=listitem)

View file

@ -260,7 +260,6 @@ def init_Plex_playlist(playlist, plex_id=None, kodi_item=None):
except KeyError: except KeyError:
log.error('Could not init Plex playlist') log.error('Could not init Plex playlist')
return return
item.ID = xml[-1].attrib['%sItemID' % playlist.kind]
playlist.items.append(item) playlist.items.append(item)
log.debug('Initialized the playlist on the Plex side: %s' % playlist) log.debug('Initialized the playlist on the Plex side: %s' % playlist)

View file

@ -96,7 +96,7 @@
<setting id="offerDelete" type="bool" label="30114" default="false" visible="false"/> <setting id="offerDelete" type="bool" label="30114" default="false" visible="false"/>
<setting id="deleteTV" type="bool" label="30115" visible="eq(-1,true)" default="false" subsetting="true" /> <setting id="deleteTV" type="bool" label="30115" visible="eq(-1,true)" default="false" subsetting="true" />
<setting id="deleteMovies" type="bool" label="30116" visible="eq(-2,true)" default="false" subsetting="true" /> <setting id="deleteMovies" type="bool" label="30116" visible="eq(-2,true)" default="false" subsetting="true" />
<setting id="resumeJumpBack" type="slider" label="30521" default="10" range="0,1,120" option="int" /> <setting id="resumeJumpBack" type="slider" label="30521" default="10" range="0,1,120" option="int" visible="false"/>
<setting type="sep" /> <setting type="sep" />
<setting id="playType" type="enum" label="30002" values="Direct Play (default)|Direct Stream|Force Transcode" default="0" /> <setting id="playType" type="enum" label="30002" values="Direct Play (default)|Direct Stream|Force Transcode" default="0" />
<setting id="transcoderVideoQualities" type="enum" label="30160" values="420x420, 320kbps|576x320, 720kbps|720x480, 1.5Mbps|1024x768, 2Mbps|1280x720, 3Mbps|1280x720, 4Mbps|1920x1080, 8Mbps|1920x1080, 10Mbps|1920x1080, 12Mbps|1920x1080, 20Mbps|1920x1080, 40Mbps" default="10" /><!-- Video Quality if Transcoding necessary --> <setting id="transcoderVideoQualities" type="enum" label="30160" values="420x420, 320kbps|576x320, 720kbps|720x480, 1.5Mbps|1024x768, 2Mbps|1280x720, 3Mbps|1280x720, 4Mbps|1920x1080, 8Mbps|1920x1080, 10Mbps|1920x1080, 12Mbps|1920x1080, 20Mbps|1920x1080, 40Mbps" default="10" /><!-- Video Quality if Transcoding necessary -->