Merge remote-tracking branch 'MediaBrowser/master' into develop
This commit is contained in:
commit
7e09253477
9 changed files with 87 additions and 44 deletions
|
@ -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="1.1.71"
|
version="1.1.72"
|
||||||
provider-name="tomkat83">
|
provider-name="tomkat83">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
version 1.1.72
|
||||||
|
- Fix to extrafanart
|
||||||
|
- Fix for artists deletion
|
||||||
|
- Fix for views
|
||||||
|
|
||||||
version 1.1.70
|
version 1.1.70
|
||||||
- Include AirsAfterSeason for special episodes ordering
|
- Include AirsAfterSeason for special episodes ordering
|
||||||
- Cover art settings - label adjusted. A reset or repair will be required if you change the settings value.
|
- Cover art settings - label adjusted. A reset or repair will be required if you change the settings value.
|
||||||
|
|
|
@ -112,7 +112,7 @@ class Items(object):
|
||||||
|
|
||||||
musicconn = None
|
musicconn = None
|
||||||
|
|
||||||
if itemtype in ('MusicAlbum', 'MusicArtist', 'Audio'):
|
if itemtype in ('MusicAlbum', 'MusicArtist', 'AlbumArtist', 'Audio'):
|
||||||
if music_enabled:
|
if music_enabled:
|
||||||
musicconn = utils.kodiSQL('music')
|
musicconn = utils.kodiSQL('music')
|
||||||
musiccursor = musicconn.cursor()
|
musiccursor = musicconn.cursor()
|
||||||
|
@ -1871,7 +1871,6 @@ class Music(Items):
|
||||||
def __init__(self, embycursor, musiccursor):
|
def __init__(self, embycursor, musiccursor):
|
||||||
|
|
||||||
Items.__init__(self, embycursor, musiccursor)
|
Items.__init__(self, embycursor, musiccursor)
|
||||||
self.musiccursor = musiccursor
|
|
||||||
|
|
||||||
self.directstream = utils.settings('streamMusic') == "true"
|
self.directstream = utils.settings('streamMusic') == "true"
|
||||||
self.userid = utils.window('emby_currUser')
|
self.userid = utils.window('emby_currUser')
|
||||||
|
@ -1928,7 +1927,7 @@ class Music(Items):
|
||||||
def add_updateArtist(self, item, artisttype="MusicArtist"):
|
def add_updateArtist(self, item, artisttype="MusicArtist"):
|
||||||
# Process a single artist
|
# Process a single artist
|
||||||
kodiversion = self.kodiversion
|
kodiversion = self.kodiversion
|
||||||
kodicursor = self.musiccursor
|
kodicursor = self.kodicursor
|
||||||
emby_db = self.emby_db
|
emby_db = self.emby_db
|
||||||
kodi_db = self.kodi_db
|
kodi_db = self.kodi_db
|
||||||
artwork = self.artwork
|
artwork = self.artwork
|
||||||
|
@ -2011,7 +2010,7 @@ class Music(Items):
|
||||||
# Process a single artist
|
# Process a single artist
|
||||||
emby = self.emby
|
emby = self.emby
|
||||||
kodiversion = self.kodiversion
|
kodiversion = self.kodiversion
|
||||||
kodicursor = self.musiccursor
|
kodicursor = self.kodicursor
|
||||||
emby_db = self.emby_db
|
emby_db = self.emby_db
|
||||||
kodi_db = self.kodi_db
|
kodi_db = self.kodi_db
|
||||||
artwork = self.artwork
|
artwork = self.artwork
|
||||||
|
@ -2169,7 +2168,7 @@ class Music(Items):
|
||||||
def add_updateSong(self, item):
|
def add_updateSong(self, item):
|
||||||
# Process single song
|
# Process single song
|
||||||
kodiversion = self.kodiversion
|
kodiversion = self.kodiversion
|
||||||
kodicursor = self.musiccursor
|
kodicursor = self.kodicursor
|
||||||
emby_db = self.emby_db
|
emby_db = self.emby_db
|
||||||
kodi_db = self.kodi_db
|
kodi_db = self.kodi_db
|
||||||
artwork = self.artwork
|
artwork = self.artwork
|
||||||
|
@ -2418,7 +2417,7 @@ class Music(Items):
|
||||||
def updateUserdata(self, item):
|
def updateUserdata(self, item):
|
||||||
# This updates: Favorite, LastPlayedDate, Playcount, PlaybackPositionTicks
|
# This updates: Favorite, LastPlayedDate, Playcount, PlaybackPositionTicks
|
||||||
# Poster with progress bar
|
# Poster with progress bar
|
||||||
kodicursor = self.musiccursor
|
kodicursor = self.kodicursor
|
||||||
emby_db = self.emby_db
|
emby_db = self.emby_db
|
||||||
kodi_db = self.kodi_db
|
kodi_db = self.kodi_db
|
||||||
API = api.API(item)
|
API = api.API(item)
|
||||||
|
@ -2457,7 +2456,7 @@ class Music(Items):
|
||||||
def remove(self, itemid):
|
def remove(self, itemid):
|
||||||
# Remove kodiid, fileid, pathid, emby reference
|
# Remove kodiid, fileid, pathid, emby reference
|
||||||
emby_db = self.emby_db
|
emby_db = self.emby_db
|
||||||
kodicursor = self.musiccursor
|
kodicursor = self.kodicursor
|
||||||
artwork = self.artwork
|
artwork = self.artwork
|
||||||
|
|
||||||
emby_dbitem = emby_db.getItem_byId(itemid)
|
emby_dbitem = emby_db.getItem_byId(itemid)
|
||||||
|
@ -2522,7 +2521,7 @@ class Music(Items):
|
||||||
|
|
||||||
def removeSong(self, kodiid):
|
def removeSong(self, kodiid):
|
||||||
|
|
||||||
kodicursor = self.musiccursor
|
kodicursor = self.kodicursor
|
||||||
artwork = self.artwork
|
artwork = self.artwork
|
||||||
|
|
||||||
artwork.deleteArtwork(kodiid, "song", kodicursor)
|
artwork.deleteArtwork(kodiid, "song", kodicursor)
|
||||||
|
@ -2530,7 +2529,7 @@ class Music(Items):
|
||||||
|
|
||||||
def removeAlbum(self, kodiid):
|
def removeAlbum(self, kodiid):
|
||||||
|
|
||||||
kodicursor = self.musiccursor
|
kodicursor = self.kodicursor
|
||||||
artwork = self.artwork
|
artwork = self.artwork
|
||||||
|
|
||||||
artwork.deleteArtwork(kodiid, "album", kodicursor)
|
artwork.deleteArtwork(kodiid, "album", kodicursor)
|
||||||
|
@ -2538,7 +2537,7 @@ class Music(Items):
|
||||||
|
|
||||||
def removeArtist(self, kodiid):
|
def removeArtist(self, kodiid):
|
||||||
|
|
||||||
kodicursor = self.musiccursor
|
kodicursor = self.kodicursor
|
||||||
artwork = self.artwork
|
artwork = self.artwork
|
||||||
|
|
||||||
artwork.deleteArtwork(kodiid, "artist", kodicursor)
|
artwork.deleteArtwork(kodiid, "artist", kodicursor)
|
||||||
|
|
|
@ -852,6 +852,7 @@ class Kodidb_Functions():
|
||||||
|
|
||||||
if self.kodiversion in (15, 16):
|
if self.kodiversion in (15, 16):
|
||||||
# Kodi Isengard, Jarvis
|
# Kodi Isengard, Jarvis
|
||||||
|
try:
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"UPDATE tag_link",
|
"UPDATE tag_link",
|
||||||
|
@ -861,8 +862,21 @@ class Kodidb_Functions():
|
||||||
"AND tag_id = ?"
|
"AND tag_id = ?"
|
||||||
))
|
))
|
||||||
cursor.execute(query, (newtag, kodiid, mediatype, oldtag,))
|
cursor.execute(query, (newtag, kodiid, mediatype, oldtag,))
|
||||||
|
except Exception as e:
|
||||||
|
# The new tag we are going to apply already exists for this item
|
||||||
|
# delete current tag instead
|
||||||
|
self.logMsg("Exception: %s" % e, 1)
|
||||||
|
query = ' '.join((
|
||||||
|
|
||||||
|
"DELETE FROM tag_link",
|
||||||
|
"WHERE media_id = ?",
|
||||||
|
"AND media_type = ?",
|
||||||
|
"AND tag_id = ?"
|
||||||
|
))
|
||||||
|
cursor.execute(query, (kodiid, mediatype, oldtag,))
|
||||||
else:
|
else:
|
||||||
# Kodi Helix
|
# Kodi Helix
|
||||||
|
try:
|
||||||
query = ' '.join((
|
query = ' '.join((
|
||||||
|
|
||||||
"UPDATE taglinks",
|
"UPDATE taglinks",
|
||||||
|
@ -872,6 +886,18 @@ class Kodidb_Functions():
|
||||||
"AND idTag = ?"
|
"AND idTag = ?"
|
||||||
))
|
))
|
||||||
cursor.execute(query, (newtag, kodiid, mediatype, oldtag,))
|
cursor.execute(query, (newtag, kodiid, mediatype, oldtag,))
|
||||||
|
except Exception as e:
|
||||||
|
# The new tag we are going to apply already exists for this item
|
||||||
|
# delete current tag instead
|
||||||
|
self.logMsg("Exception: %s" % e, 1)
|
||||||
|
query = ' '.join((
|
||||||
|
|
||||||
|
"DELETE FROM taglinks",
|
||||||
|
"WHERE idMedia = ?",
|
||||||
|
"AND media_type = ?",
|
||||||
|
"AND idTag = ?"
|
||||||
|
))
|
||||||
|
cursor.execute(query, (kodiid, mediatype, oldtag,))
|
||||||
|
|
||||||
def removeTag(self, kodiid, tagname, mediatype):
|
def removeTag(self, kodiid, tagname, mediatype):
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,28 @@ class KodiMonitor(xbmc.Monitor):
|
||||||
if library == "video":
|
if library == "video":
|
||||||
utils.window('emby_kodiScan', clear=True)
|
utils.window('emby_kodiScan', clear=True)
|
||||||
|
|
||||||
|
def onSettingsChanged(self):
|
||||||
|
# Monitor emby settings
|
||||||
|
currentPath = utils.settings('useDirectPaths')
|
||||||
|
if utils.window('emby_pluginpath') != currentPath:
|
||||||
|
# Plugin path value changed. Offer to reset
|
||||||
|
self.logMsg("Changed to playback mode detected", 1)
|
||||||
|
utils.window('emby_pluginpath', value=currentPath)
|
||||||
|
resp = xbmcgui.Dialog().yesno(
|
||||||
|
heading="Playback mode change detected",
|
||||||
|
line1=(
|
||||||
|
"Detected the playback mode has changed. The database "
|
||||||
|
"needs to be recreated for the change to be applied. "
|
||||||
|
"Proceed?"))
|
||||||
|
if resp:
|
||||||
|
utils.reset()
|
||||||
|
|
||||||
|
currentLog = utils.settings('logLevel')
|
||||||
|
if utils.window('emby_logLevel') != currentLog:
|
||||||
|
# The log level changed, set new prop
|
||||||
|
self.logMsg("New log level: %s" % currentLog, 1)
|
||||||
|
utils.window('emby_logLevel', value=currentLog)
|
||||||
|
|
||||||
def onNotification(self, sender, method, data):
|
def onNotification(self, sender, method, data):
|
||||||
|
|
||||||
doUtils = self.doUtils
|
doUtils = self.doUtils
|
||||||
|
|
|
@ -486,7 +486,7 @@ class LibrarySync(threading.Thread):
|
||||||
# This is only reserved for the detection of grouped views
|
# This is only reserved for the detection of grouped views
|
||||||
if (grouped_view['Type'] == "UserView" and
|
if (grouped_view['Type'] == "UserView" and
|
||||||
grouped_view.get('CollectionType') == mediatype and
|
grouped_view.get('CollectionType') == mediatype and
|
||||||
grouped_view['Id'] not in grouped_view['Path']):
|
grouped_view['Id'] not in grouped_view.get('Path', "")):
|
||||||
# Take the name of the userview
|
# Take the name of the userview
|
||||||
foldername = grouped_view['Name']
|
foldername = grouped_view['Name']
|
||||||
break
|
break
|
||||||
|
|
|
@ -44,11 +44,11 @@ class PlayUtils():
|
||||||
self.API.setPartNumber(partIndex)
|
self.API.setPartNumber(partIndex)
|
||||||
playurl = None
|
playurl = None
|
||||||
|
|
||||||
# if item['MediaSources'][0]['Protocol'] == "Http":
|
if item.get('MediaSources') and item['MediaSources'][0]['Protocol'] == "Http":
|
||||||
# # Only play as http
|
# Only play as http
|
||||||
# self.logMsg("File protocol is http.", 1)
|
self.logMsg("File protocol is http.", 1)
|
||||||
# playurl = self.httpPlay()
|
playurl = self.httpPlay()
|
||||||
# utils.window('emby_%s.playmethod' % playurl, value="DirectStream")
|
utils.window('emby_%s.playmethod' % playurl, value="DirectStream")
|
||||||
|
|
||||||
if self.isDirectPlay():
|
if self.isDirectPlay():
|
||||||
self.logMsg("File is direct playing.", 1)
|
self.logMsg("File is direct playing.", 1)
|
||||||
|
@ -85,7 +85,7 @@ class PlayUtils():
|
||||||
itemid = item['Id']
|
itemid = item['Id']
|
||||||
mediatype = item['MediaType']
|
mediatype = item['MediaType']
|
||||||
|
|
||||||
if type == "Audio":
|
if mediatype == "Audio":
|
||||||
playurl = "%s/emby/Audio/%s/stream" % (server, itemid)
|
playurl = "%s/emby/Audio/%s/stream" % (server, itemid)
|
||||||
else:
|
else:
|
||||||
playurl = "%s/emby/Videos/%s/stream?static=true" % (server, itemid)
|
playurl = "%s/emby/Videos/%s/stream?static=true" % (server, itemid)
|
||||||
|
|
|
@ -46,7 +46,6 @@ class UserClient(threading.Thread):
|
||||||
|
|
||||||
self.addonName = clientinfo.ClientInfo().getAddonName()
|
self.addonName = clientinfo.ClientInfo().getAddonName()
|
||||||
self.doUtils = downloadutils.DownloadUtils()
|
self.doUtils = downloadutils.DownloadUtils()
|
||||||
self.logLevel = int(utils.settings('logLevel'))
|
|
||||||
|
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
|
|
||||||
|
@ -365,15 +364,6 @@ class UserClient(threading.Thread):
|
||||||
|
|
||||||
while not monitor.abortRequested():
|
while not monitor.abortRequested():
|
||||||
|
|
||||||
# Verify the log level
|
|
||||||
currLogLevel = self.getLogLevel()
|
|
||||||
if self.logLevel != currLogLevel:
|
|
||||||
# Set new log level
|
|
||||||
self.logLevel = currLogLevel
|
|
||||||
utils.window('emby_logLevel', value=str(currLogLevel))
|
|
||||||
self.logMsg("New Log Level: %s" % currLogLevel, 0)
|
|
||||||
|
|
||||||
|
|
||||||
status = utils.window('emby_serverStatus')
|
status = utils.window('emby_serverStatus')
|
||||||
if status:
|
if status:
|
||||||
# Verify the connection status to server
|
# Verify the connection status to server
|
||||||
|
|
|
@ -57,6 +57,7 @@ class Service():
|
||||||
|
|
||||||
utils.window('emby_logLevel', value=str(logLevel))
|
utils.window('emby_logLevel', value=str(logLevel))
|
||||||
utils.window('emby_kodiProfile', value=xbmc.translatePath("special://profile"))
|
utils.window('emby_kodiProfile', value=xbmc.translatePath("special://profile"))
|
||||||
|
utils.window('emby_pluginpath', value=utils.settings('useDirectPaths'))
|
||||||
|
|
||||||
# Initial logging
|
# Initial logging
|
||||||
self.logMsg("======== START %s ========" % self.addonName, 0)
|
self.logMsg("======== START %s ========" % self.addonName, 0)
|
||||||
|
|
Loading…
Reference in a new issue