mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Fix fanart
This commit is contained in:
parent
7b2d67a8bf
commit
7b3aae2d83
2 changed files with 23 additions and 12 deletions
|
@ -799,7 +799,10 @@ def getExtraFanArt():
|
||||||
|
|
||||||
if any([x in itemPath for x in ['tvshows', 'musicvideos', 'movies']]):
|
if any([x in itemPath for x in ['tvshows', 'musicvideos', 'movies']]):
|
||||||
params = urlparse.parse_qs(itemPath)
|
params = urlparse.parse_qs(itemPath)
|
||||||
embyId = params['id'][0]
|
try:
|
||||||
|
embyId = params['id'][0]
|
||||||
|
except KeyError:
|
||||||
|
embyId = itemPath.split("/")[-2]
|
||||||
|
|
||||||
utils.logMsg("EMBY", "Requesting extrafanart for Id: %s" % embyId, 1)
|
utils.logMsg("EMBY", "Requesting extrafanart for Id: %s" % embyId, 1)
|
||||||
|
|
||||||
|
|
|
@ -458,6 +458,7 @@ def playlistXSP(mediatype, tagname, viewtype="", delete=False):
|
||||||
|
|
||||||
# Create the playlist directory
|
# Create the playlist directory
|
||||||
if not xbmcvfs.exists(path):
|
if not xbmcvfs.exists(path):
|
||||||
|
logMsg("EMBY", "Creating directory: %s" % path, 1)
|
||||||
xbmcvfs.mkdirs(path)
|
xbmcvfs.mkdirs(path)
|
||||||
|
|
||||||
# Only add the playlist if it doesn't already exists
|
# Only add the playlist if it doesn't already exists
|
||||||
|
@ -473,15 +474,22 @@ def playlistXSP(mediatype, tagname, viewtype="", delete=False):
|
||||||
itemtypes = {
|
itemtypes = {
|
||||||
'homevideos': "movies"
|
'homevideos': "movies"
|
||||||
}
|
}
|
||||||
f = open(xsppath, 'w')
|
logMsg("EMBY", "Writing playlist file to: %s" % xsppath, 1)
|
||||||
f.write(
|
try:
|
||||||
'<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\n'
|
f = open(xsppath, 'w')
|
||||||
'<smartplaylist type="%s">\n\t'
|
except:
|
||||||
'<name>Emby %s</name>\n\t'
|
logMsg("EMBY", "Failed to create playlist: %s" % xsppath, 1)
|
||||||
'<match>all</match>\n\t'
|
return
|
||||||
'<rule field="tag" operator="is">\n\t\t'
|
else:
|
||||||
'<value>%s</value>\n\t'
|
f.write(
|
||||||
'</rule>'
|
'<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\n'
|
||||||
% (itemtypes.get(mediatype, mediatype), plname, tagname))
|
'<smartplaylist type="%s">\n\t'
|
||||||
f.close()
|
'<name>Emby %s</name>\n\t'
|
||||||
|
'<match>all</match>\n\t'
|
||||||
|
'<rule field="tag" operator="is">\n\t\t'
|
||||||
|
'<value>%s</value>\n\t'
|
||||||
|
'</rule>'
|
||||||
|
'</smartplaylist>'
|
||||||
|
% (itemtypes.get(mediatype, mediatype), plname, tagname))
|
||||||
|
f.close()
|
||||||
logMsg("EMBY", "Successfully added playlist: %s" % tagname)
|
logMsg("EMBY", "Successfully added playlist: %s" % tagname)
|
Loading…
Reference in a new issue