Merge branch 'hotfixes'

This commit is contained in:
tomkat83 2017-08-02 20:09:55 +02:00
commit a7609ec062
10 changed files with 46 additions and 5 deletions

View file

@ -1,5 +1,5 @@
[![stable version](https://img.shields.io/badge/stable_version-1.8.6-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.8.6-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.8.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.8.7-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)

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="1.8.5" provider-name="croneter">
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="1.8.7" provider-name="croneter">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.requests" version="2.3.0" />
@ -59,7 +59,13 @@
<summary lang="da_DK">Indbygget Integration af Plex i Kodi</summary>
<description lang="da_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>
<disclaimer lang="da_DK">Brug på eget ansvar</disclaimer>
<news>version 1.8.6:
<news>version 1.8.7:
- Some fixes to playstate reporting, thanks @RickDB
- Add Kodi info screen for episodes in context menu
- Fix PKC asking for trailers not working
- Fix PKC not automatically updating
version 1.8.6:
- Portuguese translation, thanks @goncalo532
- Updated other translations

View file

@ -1,3 +1,9 @@
version 1.8.7:
- Some fixes to playstate reporting, thanks @RickDB
- Add Kodi info screen for episodes in context menu
- Fix PKC asking for trailers not working
- Fix PKC not automatically updating
version 1.8.6:
- Portuguese translation, thanks @goncalo532
- Updated other translations

View file

@ -104,6 +104,11 @@ msgctxt "#30031"
msgid "I own this Plex Media Server"
msgstr "Dieser Plex Media Server gehört mir"
# Kodi context menu entry for movie and episode information screen
msgctxt "#30032"
msgid "Information"
msgstr "Informationen"
msgctxt "#30035"
msgid "Number of recent Music Albums to show:"
msgstr "Anzahl anzuzeigender zuletzt hinzugefügter Alben:"

View file

@ -103,6 +103,11 @@ msgctxt "#30031"
msgid "I own this Plex Media Server"
msgstr ""
# Kodi context menu entry for movie and episode information screen
msgctxt "#30032"
msgid "Information"
msgstr ""
msgctxt "#30035"
msgid "Number of recent Music Albums to show:"
msgstr ""

View file

@ -2534,6 +2534,12 @@ class API():
# Expensive operation
metadata['title'] = title
listItem.setInfo('video', infoLabels=metadata)
try:
# Add context menu entry for information screen
listItem.addContextMenuItems([(lang(30032), 'XBMC.Action(Info)',)])
except TypeError:
# Kodi fuck-up
pass
return listItem
def add_video_streams(self, listItem):

View file

@ -255,6 +255,11 @@ def createListItem(item, appendShowTitle=False, appendSxxExx=False):
li.setArt({'icon': 'DefaultTVShows.png'})
li.setProperty('dbid', str(item['episodeid']))
li.setProperty('fanart_image', item['art'].get('tvshow.fanart',''))
try:
li.addContextMenuItems([(lang(30032), 'XBMC.Action(Info)',)])
except TypeError:
# Kodi fuck-up
pass
for key, value in item['streamdetails'].iteritems():
for stream in value:
li.addStreamInfo(key, stream)

View file

@ -158,6 +158,12 @@ class Items(object):
# If the playback was stopped, check whether we need to increment the
# playcount. PMS won't tell us the playcount via websockets
if item['state'] in ('stopped', 'ended'):
# If offset exceeds duration skip update
if item['viewOffset'] > item['duration']:
log.error("Error while updating play state, viewOffset exceeded duration")
return
complete = float(item['viewOffset']) / float(item['duration'])
log.info('Item %s stopped with completion rate %s percent.'
'Mark item played at %s percent.'

View file

@ -92,6 +92,7 @@ class KodiMonitor(Monitor):
# Manually marking as watched/unwatched
playcount = data.get('playcount')
item = data.get('item')
try:
kodiid = item['id']
item_type = item['type']
@ -114,7 +115,7 @@ class KodiMonitor(Monitor):
window('plex_skipWatched%s' % itemid, clear=True)
else:
# notify the server
if playcount != 0:
if playcount > 0:
scrobble(itemid, 'watched')
else:
scrobble(itemid, 'unwatched')

View file

@ -129,6 +129,7 @@ class PlaybackUtils():
trailers = xbmcgui.Dialog().yesno(
lang(29999),
"Play trailers?")
trailers = True if trailers else False
else:
trailers = True
# Post to the PMS. REUSE THE PLAYQUEUE!