Fix smart playlists for Plex collections

This commit is contained in:
tomkat83 2016-04-13 17:11:25 +02:00
parent f34900ae6e
commit bf681f53c3

View file

@ -894,7 +894,9 @@ def playlistXSP(mediatype, tagname, viewid, viewtype="", delete=False):
# Using write process since there's no guarantee the xml declaration works with etree # Using write process since there's no guarantee the xml declaration works with etree
itemtypes = { itemtypes = {
'homevideos': "movie" 'homevideos': 'movies',
'movie': 'movies',
'show': 'tvshows'
} }
logMsg("Plex", "Writing playlist file to: %s" % xsppath, 1) logMsg("Plex", "Writing playlist file to: %s" % xsppath, 1)
try: try:
@ -911,7 +913,7 @@ def playlistXSP(mediatype, tagname, viewid, viewtype="", delete=False):
'<rule field="tag" operator="is">\n\t\t' '<rule field="tag" operator="is">\n\t\t'
'<value>%s</value>\n\t' '<value>%s</value>\n\t'
'</rule>\n' '</rule>\n'
'</smartplaylist>' '</smartplaylist>\n'
% (itemtypes.get(mediatype, mediatype), plname, tagname)) % (itemtypes.get(mediatype, mediatype), plname, tagname))
.encode('utf-8')) .encode('utf-8'))
f.close() f.close()