Fix Kodi information screen not working
This commit is contained in:
parent
79349ce4af
commit
fdb42c1f26
2 changed files with 25 additions and 0 deletions
|
@ -47,6 +47,27 @@ class Kodidb_Functions():
|
|||
self.clientInfo = clientinfo.ClientInfo()
|
||||
self.artwork = artwork.Artwork()
|
||||
|
||||
def pathHack(self):
|
||||
"""
|
||||
Use with Kodi video DB
|
||||
|
||||
Sets strContent to e.g. 'movies' and strScraper to metadata.local
|
||||
|
||||
For some reason, Kodi ignores this if done via itemtypes while e.g.
|
||||
adding or updating items. (addPath method does NOT work)
|
||||
"""
|
||||
types = ['movies', 'tvshows']
|
||||
query = ' '.join((
|
||||
"UPDATE path",
|
||||
"SET strContent = ?, strScraper = ?",
|
||||
"WHERE strPath LIKE ?"
|
||||
))
|
||||
for typus in types:
|
||||
self.cursor.execute(
|
||||
query, (typus,
|
||||
'metadata.local',
|
||||
'plugin://plugin.video.plexkodiconnect.%s%%' % typus))
|
||||
|
||||
def addPath(self, path, strHash=None):
|
||||
# SQL won't return existing paths otherwise
|
||||
if path is None:
|
||||
|
|
|
@ -460,6 +460,10 @@ class LibrarySync(Thread):
|
|||
if utils.window('plex_scancrashed') == 'true':
|
||||
xbmcgui.Dialog().ok(self.addonName, self.__language__(39408))
|
||||
utils.window('plex_scancrashed', clear=True)
|
||||
|
||||
# Path hack, so Kodis Information screen works
|
||||
with kodidb.GetKodiDB('video') as kodi_db:
|
||||
kodi_db.pathHack()
|
||||
return True
|
||||
|
||||
def processView(self, folderItem, kodi_db, emby_db, totalnodes):
|
||||
|
|
Loading…
Reference in a new issue