Fix Episode Info not popping up

This commit is contained in:
tomkat83 2016-04-20 08:46:51 +02:00
parent f1015ab847
commit 34c40f1f28
2 changed files with 14 additions and 9 deletions

View file

@ -1301,9 +1301,9 @@ class TVShows(Items):
# GET THE FILE AND PATH #####
doIndirect = not self.directpath
playurl = API.getFilePath()
if self.directpath:
# Direct paths is set the Kodi way
playurl = API.getFilePath()
if playurl is None:
# Something went wrong, trying to use non-direct paths
doIndirect = True
@ -1320,9 +1320,16 @@ class TVShows(Items):
path = playurl.replace(filename, "")
if doIndirect:
# Set plugin path and media flags using real filename
path = "plugin://plugin.video.plexkodiconnect.tvshows/"
if playurl is not None:
if '\\' in playurl:
filename = playurl.rsplit('\\', 1)[1]
else:
filename = playurl.rsplit('/', 1)[1]
else:
filename = 'file_not_found'
path = "plugin://plugin.video.plexkodiconnect.tvshows/%s/" % seriesId
params = {
'filename': API.getKey().encode('utf-8'),
'filename': filename.encode('utf-8'),
'id': itemid,
'dbid': episodeid,
'mode': "play"

View file

@ -56,17 +56,15 @@ class Kodidb_Functions():
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))
self.cursor.execute(
query, ('movies',
'metadata.local',
'plugin://plugin.video.plexkodiconnect.movies%%'))
def addPath(self, path, strHash=None):
# SQL won't return existing paths otherwise