Merge remote-tracking branch 'MediaBrowser/master' into develop

This commit is contained in:
tomkat83 2016-02-07 13:42:40 +01:00
commit 300b5d11ad
7 changed files with 87 additions and 66 deletions

View file

@ -1,7 +1,7 @@
<?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" name="PlexKodiConnect"
version="2.0.1" version="2.0.3"
provider-name="croneter"> provider-name="croneter">
<requires> <requires>
<import addon="xbmc.python" version="2.1.0"/> <import addon="xbmc.python" version="2.1.0"/>

View file

@ -1,3 +1,11 @@
version 2.0.3
- Add new retention time option that the latest server Sync plugin uses to help determine if full sync or inc sync should be used.
- Add control over new content pop up display time. You will find the settings under Extras > Enable new content notification
- Change to the transcode H265 setting. You will need to re-select the proper resolution, if you had the setting enabled.
- Change to the paths added to sources.xml
- Fix to the manual sync for the music library
- Fix resume when launching playback via the web client
version 1.1.81 version 1.1.81
- Fix missing deviceId - Fix missing deviceId
- Fix to newly added album/songs (if you experienced the bug, you will need to reset to fix it. Know that moving forward, it is corrected.) - Fix to newly added album/songs (if you experienced the bug, you will need to reset to fix it. Know that moving forward, it is corrected.)

View file

@ -126,21 +126,10 @@
<string id="30140"> - Loop Theme Music</string> <string id="30140"> - Loop Theme Music</string>
<string id="30141">Enable Background Image (Requires Restart)</string> <string id="30141">Enable Background Image (Requires Restart)</string>
<string id="30142">Services</string> <string id="30142">Services</string>
<string id="30143">Enable Info Loader (Requires Restart)</string>
<string id="30144">Enable Menu Loader (Requires Restart)</string>
<string id="30145">Enable WebSocket Remote (Requires Restart)</string>
<string id="30146">Enable In Progress Loader (Requires Restart)</string>
<string id="30147">Enable Recent Info Loader (Requires Restart)</string>
<string id="30148">Enable Random Loader (Requires Restart)</string>
<string id="30149">Enable Next Up Loader (Requires Restart)</string>
<string id="30150">Skin does not support setting views</string> <string id="30150">Skin does not support setting views</string>
<string id="30151">Select item action (Requires Restart)</string> <string id="30151">Select item action (Requires Restart)</string>
<string id="30152">Show Indicators</string>
<string id="30153"> - Show Watched Indicator</string>
<string id="30154"> - Show Unplayed Count Indicator</string>
<string id="30155"> - Show Played Percentage Indicator</string>
<string id="30156">Sort NextUp by Show Title</string> <string id="30156">Sort NextUp by Show Title</string>
<string id="30157">Enable Enhanced Images (eg CoverArt)</string><!-- Verified --> <string id="30157">Enable Enhanced Images (eg CoverArt)</string><!-- Verified -->
<string id="30158">Metadata</string> <string id="30158">Metadata</string>
@ -158,19 +147,19 @@
<string id="30168">Found server</string> <string id="30168">Found server</string>
<string id="30169">Address : </string> <string id="30169">Address : </string>
<!-- Video nodes -->
<string id="30170">Recently Added Tv Shows</string> <string id="30170">Recently Added TV Shows</string><!-- Verified -->
<string id="30171">In Progress Tv Shows</string> <string id="30171">In Progress TV Shows</string><!-- Verified -->
<string id="30172">All Music</string> <string id="30172">All Music</string>
<string id="30173">Channels</string> <string id="30173">Channels</string><!-- Verified -->
<string id="30174">Recently Added Movies</string> <string id="30174">Recently Added Movies</string><!-- Verified -->
<string id="30175">Recently Added Episodes</string> <string id="30175">Recently Added Episodes</string><!-- Verified -->
<string id="30176">Recently Added Albums</string> <string id="30176">Recently Added Albums</string>
<string id="30177">In Progress Movies</string> <string id="30177">In Progress Movies</string><!-- Verified -->
<string id="30178">In Progress Episodes</string> <string id="30178">In Progress Episodes</string><!-- Verified -->
<string id="30179">Next Episodes</string> <string id="30179">Next Episodes</string><!-- Verified -->
<string id="30180">Favorite Movies</string> <string id="30180">Favorite Movies</string><!-- Verified -->
<string id="30181">Favorite Shows</string> <string id="30181">Favorite Shows</string><!-- Verified -->
<string id="30182">Favorite Episodes</string> <string id="30182">Favorite Episodes</string>
<string id="30183">Frequent Played Albums</string> <string id="30183">Frequent Played Albums</string>
<string id="30184">Upcoming TV</string> <string id="30184">Upcoming TV</string>
@ -178,7 +167,7 @@
<string id="30186">Trailers</string> <string id="30186">Trailers</string>
<string id="30187">Music Videos</string> <string id="30187">Music Videos</string>
<string id="30188">Photos</string> <string id="30188">Photos</string>
<string id="30189">Unwatched Movies</string> <string id="30189">Unwatched Movies</string><!-- Verified -->
<string id="30190">Movie Genres</string> <string id="30190">Movie Genres</string>
<string id="30191">Movie Studios</string> <string id="30191">Movie Studios</string>
<string id="30192">Movie Actors</string> <string id="30192">Movie Actors</string>
@ -220,8 +209,8 @@
<string id="30227">Random Movies</string> <string id="30227">Random Movies</string>
<string id="30228">Random Episodes</string> <string id="30228">Random Episodes</string>
<string id="30229">Random Items</string> <string id="30229">Random Items</string><!-- Verified -->
<string id="30230">Recommended Items</string> <string id="30230">Recommended Items</string><!-- Verified -->
<string id="30235">Extras</string><!-- Verified --> <string id="30235">Extras</string><!-- Verified -->
<string id="30236">Sync Theme Music</string> <string id="30236">Sync Theme Music</string>
@ -233,18 +222,22 @@
<string id="30241">DB Sync Indication:</string> <string id="30241">DB Sync Indication:</string>
<string id="30242">Play Count Sync Indication:</string> <string id="30242">Play Count Sync Indication:</string>
<string id="30243">Enable HTTPS</string><!-- Verified --> <string id="30243">Enable HTTPS</string><!-- Verified -->
<string id="30245">Force Transcoding Codecs</string>
<string id="30246">Enable Netflix style next up notification</string>
<string id="30247"> - The number of seconds before the end to show the notification</string>
<string id="30248">Show Emby Info dialog on play/select action</string>
<string id="30249">Enable server connection message on startup</string><!-- Verified --> <string id="30249">Enable server connection message on startup</string><!-- Verified -->
<string id="30251">Recently added Home Videos</string> <string id="30251">Recently added Home Videos</string><!-- Verified -->
<string id="30252">Recently added Photos</string> <string id="30252">Recently added Photos</string><!-- Verified -->
<string id="30253">Favourite Home Videos</string> <string id="30253">Favourite Home Videos</string><!-- Verified -->
<string id="30254">Favourite Photos</string> <string id="30254">Favourite Photos</string><!-- Verified -->
<string id="30255">Favourite Albums</string> <string id="30255">Favourite Albums</string>
<string id="30256">Recently added Music videos</string> <string id="30256">Recently added Music videos</string><!-- Verified -->
<string id="30257">In progress Music videos</string> <string id="30257">In progress Music videos</string><!-- Verified -->
<string id="30258">Unwatched Music videos</string> <string id="30258">Unwatched Music videos</string><!-- Verified -->
<!-- Default views --> <!-- Default views -->
<string id="30300">Active</string> <string id="30300">Active</string>
@ -305,8 +298,8 @@
<string id="30529">Startup delay (in seconds)</string> <string id="30529">Startup delay (in seconds)</string>
<string id="30530">Enable server restart message</string> <string id="30530">Enable server restart message</string>
<string id="30531">Enable new content notification</string> <string id="30531">Enable new content notification</string>
<string id="30532">Duration for the video library (in seconds)</string> <string id="30532">Duration of the video library pop up (in seconds)</string>
<string id="30533">Duration for the music library (in seconds)</string> <string id="30533">Duration of the music library pop up (in seconds)</string>
<!-- service add-on --> <!-- service add-on -->
<string id="33000">Welcome</string> <string id="33000">Welcome</string>

View file

@ -829,7 +829,7 @@ def getNextUpEpisodes(tagname, limit):
'filter': { 'filter': {
'and': [ 'and': [
{'operator': "true", 'field': "inprogress", 'value': ""}, {'operator': "true", 'field': "inprogress", 'value': ""},
{'operator': "contains", 'field': "tag", 'value': "%s" % tagname} {'operator': "is", 'field': "tag", 'value': "%s" % tagname}
]}, ]},
'properties': ['title', 'studio', 'mpaa', 'file', 'art'] 'properties': ['title', 'studio', 'mpaa', 'file', 'art']
} }
@ -927,7 +927,7 @@ def getInProgressEpisodes(tagname, limit):
'filter': { 'filter': {
'and': [ 'and': [
{'operator': "true", 'field': "inprogress", 'value': ""}, {'operator': "true", 'field': "inprogress", 'value': ""},
{'operator': "contains", 'field': "tag", 'value': "%s" % tagname} {'operator': "is", 'field': "tag", 'value': "%s" % tagname}
]}, ]},
'properties': ['title', 'studio', 'mpaa', 'file', 'art'] 'properties': ['title', 'studio', 'mpaa', 'file', 'art']
} }
@ -995,7 +995,7 @@ def getRecentEpisodes(tagname, limit):
'params': { 'params': {
'sort': {'order': "descending", 'method': "dateadded"}, 'sort': {'order': "descending", 'method': "dateadded"},
'filter': {'operator': "contains", 'field': "tag", 'value': "%s" % tagname}, 'filter': {'operator': "is", 'field': "tag", 'value': "%s" % tagname},
'properties': ["title","sorttitle"] 'properties': ["title","sorttitle"]
} }
} }

View file

@ -6,6 +6,7 @@ import cProfile
import inspect import inspect
import pstats import pstats
import sqlite3 import sqlite3
from datetime import datetime, time
import time import time
import unicodedata import unicodedata
import xml.etree.ElementTree as etree import xml.etree.ElementTree as etree
@ -394,6 +395,16 @@ def stopProfiling(pr, profileName):
"{0}".format(cumulative_time), func_name, filename)) "{0}".format(cumulative_time), func_name, filename))
f.close() f.close()
def convertdate(date):
try:
date = datetime.strptime(date, "%Y-%m-%dT%H:%M:%SZ")
except TypeError:
# TypeError: attribute of type 'NoneType' is not callable
# Known Kodi/python error
date = datetime(*(time.strptime(date, "%Y-%m-%dT%H:%M:%SZ")[0:6]))
return date
def normalize_nodes(text): def normalize_nodes(text):
# For video nodes # For video nodes
text = text.replace(":", "") text = text.replace(":", "")

View file

@ -42,6 +42,7 @@ class VideoNodes(object):
def viewNode(self, indexnumber, tagname, mediatype, viewtype, delete=False): def viewNode(self, indexnumber, tagname, mediatype, viewtype, delete=False):
window = utils.window
kodiversion = self.kodiversion kodiversion = self.kodiversion
cleantagname = utils.normalize_nodes(tagname.encode('utf-8')) cleantagname = utils.normalize_nodes(tagname.encode('utf-8'))
@ -80,13 +81,13 @@ class VideoNodes(object):
path = "library://video/plex%s/" % dirname path = "library://video/plex%s/" % dirname
for i in range(1, indexnumber): for i in range(1, indexnumber):
# Verify to make sure we don't create duplicates # Verify to make sure we don't create duplicates
if utils.window('Emby.nodes.%s.index' % i) == path: if window('Emby.nodes.%s.index' % i) == path:
return return
if mediatype=="photos": if mediatype == "photos":
path = "plugin://plugin.video.emby/?id=%s&mode=getsubfolders" % indexnumber path = "plugin://plugin.video.emby/?id=%s&mode=getsubfolders" % indexnumber
utils.window('Emby.nodes.%s.index' % indexnumber, value=path) window('Emby.nodes.%s.index' % indexnumber, value=path)
# Root # Root
if not mediatype=="photos": if not mediatype=="photos":
@ -151,13 +152,14 @@ class VideoNodes(object):
'8': 30255, '8': 30255,
'11': 30254 '11': 30254
}, },
'musicvideos': 'musicvideos':
{ {
'1': tagname, '1': tagname,
'2': 30256, '2': 30256,
'4': 30257, '4': 30257,
'6': 30258 '6': 30258
}, }
} }
nodes = mediatypes[mediatype] nodes = mediatypes[mediatype]
@ -206,19 +208,20 @@ class VideoNodes(object):
templabel = label templabel = label
embynode = "Emby.nodes.%s" % indexnumber embynode = "Emby.nodes.%s" % indexnumber
utils.window('%s.title' % embynode, value=templabel) window('%s.title' % embynode, value=templabel)
utils.window('%s.path' % embynode, value=windowpath) window('%s.path' % embynode, value=windowpath)
utils.window('%s.content' % embynode, value=path) window('%s.content' % embynode, value=path)
utils.window('%s.type' % embynode, value=mediatype) window('%s.type' % embynode, value=mediatype)
else: else:
embynode = "Emby.nodes.%s.%s" % (indexnumber, nodetype) embynode = "Emby.nodes.%s.%s" % (indexnumber, nodetype)
utils.window('%s.title' % embynode, value=label) window('%s.title' % embynode, value=label)
utils.window('%s.path' % embynode, value=windowpath) window('%s.path' % embynode, value=windowpath)
utils.window('%s.content' % embynode, value=path) window('%s.content' % embynode, value=path)
if mediatype=="photos": if mediatype == "photos":
#for photos we do not create a node in videos but we do want the window props to be created # For photos, we do not create a node in videos but we do want the window props
#todo: add our photos nodes to kodi picture sources somehow # to be created.
# To do: add our photos nodes to kodi picture sources somehow
continue continue
if xbmcvfs.exists(nodeXML): if xbmcvfs.exists(nodeXML):
@ -226,7 +229,8 @@ class VideoNodes(object):
continue continue
# Create the root # Create the root
if nodetype == "nextepisodes" or (kodiversion == 14 and nodetype in ('recentepisodes', 'inprogressepisodes')) or mediatype=="homevideos": if (nodetype == "nextepisodes" or mediatype == "homevideos" or
(kodiversion == 14 and nodetype in ('recentepisodes', 'inprogressepisodes'))):
# Folder type with plugin path # Folder type with plugin path
root = self.commonRoot(order=node, label=label, tagname=tagname, roottype=2) root = self.commonRoot(order=node, label=label, tagname=tagname, roottype=2)
etree.SubElement(root, 'path').text = path etree.SubElement(root, 'path').text = path
@ -299,6 +303,8 @@ class VideoNodes(object):
def singleNode(self, indexnumber, tagname, mediatype, itemtype): def singleNode(self, indexnumber, tagname, mediatype, itemtype):
window = utils.window
tagname = tagname.encode('utf-8') tagname = tagname.encode('utf-8')
cleantagname = utils.normalize_nodes(tagname) cleantagname = utils.normalize_nodes(tagname)
nodepath = xbmc.translatePath("special://profile/library/video/").decode('utf-8') nodepath = xbmc.translatePath("special://profile/library/video/").decode('utf-8')
@ -322,10 +328,10 @@ class VideoNodes(object):
} }
label = utils.language(labels[tagname]) label = utils.language(labels[tagname])
embynode = "Emby.nodes.%s" % indexnumber embynode = "Emby.nodes.%s" % indexnumber
utils.window('%s.title' % embynode, value=label) window('%s.title' % embynode, value=label)
utils.window('%s.path' % embynode, value=windowpath) window('%s.path' % embynode, value=windowpath)
utils.window('%s.content' % embynode, value=path) window('%s.content' % embynode, value=path)
utils.window('%s.type' % embynode, value=itemtype) window('%s.type' % embynode, value=itemtype)
if xbmcvfs.exists(nodeXML): if xbmcvfs.exists(nodeXML):
# Don't recreate xml if already exists # Don't recreate xml if already exists
@ -347,8 +353,10 @@ class VideoNodes(object):
def clearProperties(self): def clearProperties(self):
window = utils.window
self.logMsg("Clearing nodes properties.", 1) self.logMsg("Clearing nodes properties.", 1)
embyprops = utils.window('Emby.nodes.total') embyprops = window('Emby.nodes.total')
propnames = [ propnames = [
"index","path","title","content", "index","path","title","content",
@ -367,4 +375,4 @@ class VideoNodes(object):
totalnodes = int(embyprops) totalnodes = int(embyprops)
for i in range(totalnodes): for i in range(totalnodes):
for prop in propnames: for prop in propnames:
utils.window('Emby.nodes.%s.%s' % (str(i), prop), clear=True) window('Emby.nodes.%s.%s' % (str(i), prop), clear=True)

View file

@ -10,7 +10,8 @@ from datetime import datetime
import xbmc import xbmc
import xbmcaddon import xbmcaddon
import xbmcgui import xbmcgui
# import xbmcvfs import _strptime
import xbmcvfs
################################################################################################# #################################################################################################