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"?>
<addon id="plugin.video.plexkodiconnect"
name="PlexKodiConnect"
version="2.0.1"
version="2.0.3"
provider-name="croneter">
<requires>
<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
- 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.)

View file

@ -126,21 +126,10 @@
<string id="30140"> - Loop Theme Music</string>
<string id="30141">Enable Background Image (Requires Restart)</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="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="30157">Enable Enhanced Images (eg CoverArt)</string><!-- Verified -->
<string id="30158">Metadata</string>
@ -151,26 +140,26 @@
<string id="30162">Add Season Number</string>
<string id="30163">Flatten Seasons</string>
<string id="30164">Direct Play - HTTP</string>
<string id="30164">Direct Play - HTTP</string>
<string id="30165">Direct Play</string>
<string id="30166">Transcoding</string>
<string id="30167">Server Detection Succeeded</string>
<string id="30168">Found server</string>
<string id="30169">Address : </string>
<string id="30170">Recently Added Tv Shows</string>
<string id="30171">In Progress Tv Shows</string>
<!-- Video nodes -->
<string id="30170">Recently Added TV Shows</string><!-- Verified -->
<string id="30171">In Progress TV Shows</string><!-- Verified -->
<string id="30172">All Music</string>
<string id="30173">Channels</string>
<string id="30174">Recently Added Movies</string>
<string id="30175">Recently Added Episodes</string>
<string id="30173">Channels</string><!-- Verified -->
<string id="30174">Recently Added Movies</string><!-- Verified -->
<string id="30175">Recently Added Episodes</string><!-- Verified -->
<string id="30176">Recently Added Albums</string>
<string id="30177">In Progress Movies</string>
<string id="30178">In Progress Episodes</string>
<string id="30179">Next Episodes</string>
<string id="30180">Favorite Movies</string>
<string id="30181">Favorite Shows</string>
<string id="30177">In Progress Movies</string><!-- Verified -->
<string id="30178">In Progress Episodes</string><!-- Verified -->
<string id="30179">Next Episodes</string><!-- Verified -->
<string id="30180">Favorite Movies</string><!-- Verified -->
<string id="30181">Favorite Shows</string><!-- Verified -->
<string id="30182">Favorite Episodes</string>
<string id="30183">Frequent Played Albums</string>
<string id="30184">Upcoming TV</string>
@ -178,7 +167,7 @@
<string id="30186">Trailers</string>
<string id="30187">Music Videos</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="30191">Movie Studios</string>
<string id="30192">Movie Actors</string>
@ -207,7 +196,7 @@
<string id="30212">Enable Theme Videos (Requires Restart)</string>
<string id="30213"> - Loop Theme Videos</string>
<string id="30216">AutoPlay remaining episodes in a season</string>
<string id="30218">Compress Artwork</string>
<string id="30220">Latest </string>
@ -220,33 +209,37 @@
<string id="30227">Random Movies</string>
<string id="30228">Random Episodes</string>
<string id="30229">Random Items</string>
<string id="30230">Recommended Items</string>
<string id="30229">Random Items</string><!-- Verified -->
<string id="30230">Recommended Items</string><!-- Verified -->
<string id="30235">Extras</string><!-- Verified -->
<string id="30236">Sync Theme Music</string>
<string id="30237">Sync Extra Fanart</string>
<string id="30238">Sync Movie BoxSets</string>
<string id="30238">Sync Movie BoxSets</string>
<string id="30239">Reset local Kodi database</string><!-- Verified -->
<string id="30240">Enable watched/resume status sync</string>
<string id="30241">DB Sync Indication:</string>
<string id="30242">Play Count Sync Indication:</string>
<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="30251">Recently added Home Videos</string>
<string id="30252">Recently added Photos</string>
<string id="30253">Favourite Home Videos</string>
<string id="30254">Favourite Photos</string>
<string id="30251">Recently added Home Videos</string><!-- Verified -->
<string id="30252">Recently added Photos</string><!-- Verified -->
<string id="30253">Favourite Home Videos</string><!-- Verified -->
<string id="30254">Favourite Photos</string><!-- Verified -->
<string id="30255">Favourite Albums</string>
<string id="30256">Recently added Music videos</string>
<string id="30257">In progress Music videos</string>
<string id="30258">Unwatched Music videos</string>
<string id="30256">Recently added Music videos</string><!-- Verified -->
<string id="30257">In progress Music videos</string><!-- Verified -->
<string id="30258">Unwatched Music videos</string><!-- Verified -->
<!-- Default views -->
<!-- Default views -->
<string id="30300">Active</string>
<string id="30301">Clear Settings</string>
<string id="30302">Movies</string>
@ -260,8 +253,8 @@
<string id="30310">Music Videos</string>
<string id="30311">Music Tracks</string>
<string id="30312">Channels</string>
<!-- contextmenu -->
<!-- contextmenu -->
<string id="30401">Emby options</string>
<string id="30402">Clear like for this item</string>
<string id="30403">Like this item</string>
@ -305,8 +298,8 @@
<string id="30529">Startup delay (in seconds)</string>
<string id="30530">Enable server restart message</string>
<string id="30531">Enable new content notification</string>
<string id="30532">Duration for the video library (in seconds)</string>
<string id="30533">Duration for the music library (in seconds)</string>
<string id="30532">Duration of the video library pop up (in seconds)</string>
<string id="30533">Duration of the music library pop up (in seconds)</string>
<!-- service add-on -->
<string id="33000">Welcome</string>

View file

@ -829,7 +829,7 @@ def getNextUpEpisodes(tagname, limit):
'filter': {
'and': [
{'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']
}
@ -927,7 +927,7 @@ def getInProgressEpisodes(tagname, limit):
'filter': {
'and': [
{'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']
}
@ -995,7 +995,7 @@ def getRecentEpisodes(tagname, limit):
'params': {
'sort': {'order': "descending", 'method': "dateadded"},
'filter': {'operator': "contains", 'field': "tag", 'value': "%s" % tagname},
'filter': {'operator': "is", 'field': "tag", 'value': "%s" % tagname},
'properties': ["title","sorttitle"]
}
}

View file

@ -6,6 +6,7 @@ import cProfile
import inspect
import pstats
import sqlite3
from datetime import datetime, time
import time
import unicodedata
import xml.etree.ElementTree as etree
@ -394,6 +395,16 @@ def stopProfiling(pr, profileName):
"{0}".format(cumulative_time), func_name, filename))
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):
# For video nodes
text = text.replace(":", "")

View file

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