mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 10:46:11 +00:00
Minor fixes for direct path
Fix toplevel tvshows path so info screen shows Some KodiMonitor fix from Shaun
This commit is contained in:
parent
698e1edb02
commit
f4ea4927c3
2 changed files with 12 additions and 6 deletions
|
@ -35,7 +35,7 @@ class Kodi_Monitor(xbmc.Monitor):
|
||||||
WINDOW = self.WINDOW
|
WINDOW = self.WINDOW
|
||||||
downloadUtils = DownloadUtils()
|
downloadUtils = DownloadUtils()
|
||||||
#player started playing an item -
|
#player started playing an item -
|
||||||
if "Playlist.OnAdd" in method and addon.getSetting('useDirectPaths')=='true':
|
if ("Playlist.OnAdd" in method or "Player.OnPlay" in method) and addon.getSetting('useDirectPaths')=='true':
|
||||||
|
|
||||||
jsondata = json.loads(data)
|
jsondata = json.loads(data)
|
||||||
if jsondata != None:
|
if jsondata != None:
|
||||||
|
|
|
@ -456,7 +456,16 @@ class WriteKodiVideoDB():
|
||||||
else:
|
else:
|
||||||
premieredate = None
|
premieredate = None
|
||||||
|
|
||||||
|
#create toplevel path as monitored source - needed for things like actors and stuff to work (no clue why)
|
||||||
|
if addon.getSetting('useDirectPaths')=='true':
|
||||||
|
playurl = MBitem["Path"].replace("\\\\", "smb://").replace("\\", "/")
|
||||||
|
#make sure that the path always ends with a slash
|
||||||
|
path = utils.convertEncoding(playurl + "/")
|
||||||
|
toplevelpathstr = path.rsplit("/",2)[1]
|
||||||
|
toplevelpath = path.replace(toplevelpathstr + "/","")
|
||||||
|
else:
|
||||||
path = "plugin://plugin.video.emby/tvshows/" + MBitem["Id"] + "/"
|
path = "plugin://plugin.video.emby/tvshows/" + MBitem["Id"] + "/"
|
||||||
|
toplevelpath = "plugin://plugin.video.emby/"
|
||||||
|
|
||||||
#### ADD THE TV SHOW TO KODI ##############
|
#### ADD THE TV SHOW TO KODI ##############
|
||||||
if showid == None:
|
if showid == None:
|
||||||
|
@ -469,9 +478,6 @@ class WriteKodiVideoDB():
|
||||||
pathid = pathid + 1
|
pathid = pathid + 1
|
||||||
pathsql="insert into path(idPath, strPath, strContent, strScraper, noUpdate) values(?, ?, ?, ?, ?)"
|
pathsql="insert into path(idPath, strPath, strContent, strScraper, noUpdate) values(?, ?, ?, ?, ?)"
|
||||||
cursor.execute(pathsql, (pathid,path,None,None,1))
|
cursor.execute(pathsql, (pathid,path,None,None,1))
|
||||||
|
|
||||||
#create toplevel path as monitored source - needed for things like actors and stuff to work (no clue why)
|
|
||||||
toplevelpath = "plugin://plugin.video.emby/"
|
|
||||||
cursor.execute("SELECT idPath as tlpathid FROM path WHERE strPath = ?",(toplevelpath,))
|
cursor.execute("SELECT idPath as tlpathid FROM path WHERE strPath = ?",(toplevelpath,))
|
||||||
result = cursor.fetchone()
|
result = cursor.fetchone()
|
||||||
if result == None:
|
if result == None:
|
||||||
|
|
Loading…
Reference in a new issue