mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06: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
|
||||
downloadUtils = DownloadUtils()
|
||||
#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)
|
||||
if jsondata != None:
|
||||
|
|
|
@ -455,8 +455,17 @@ class WriteKodiVideoDB():
|
|||
premieredate = premieredatelist[0]
|
||||
else:
|
||||
premieredate = None
|
||||
|
||||
path = "plugin://plugin.video.emby/tvshows/" + MBitem["Id"] + "/"
|
||||
|
||||
#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"] + "/"
|
||||
toplevelpath = "plugin://plugin.video.emby/"
|
||||
|
||||
#### ADD THE TV SHOW TO KODI ##############
|
||||
if showid == None:
|
||||
|
@ -469,9 +478,6 @@ class WriteKodiVideoDB():
|
|||
pathid = pathid + 1
|
||||
pathsql="insert into path(idPath, strPath, strContent, strScraper, noUpdate) values(?, ?, ?, ?, ?)"
|
||||
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,))
|
||||
result = cursor.fetchone()
|
||||
if result == None:
|
||||
|
|
Loading…
Reference in a new issue