Fix Kodi content type for images/photos

This commit is contained in:
croneter 2020-06-09 11:25:52 +02:00
parent 038477fa77
commit 9d97d2b788
2 changed files with 9 additions and 9 deletions

View file

@ -118,16 +118,15 @@ def show_main_menu(content_type=None):
# we need to figure out which items to show in each listing. for # we need to figure out which items to show in each listing. for
# now we just only show picture nodes in the picture library video # now we just only show picture nodes in the picture library video
# nodes in the video library and all nodes in any other window # nodes in the video library and all nodes in any other window
if node_type == 'photos' and content_type == 'image': if node_type == v.CONTENT_TYPE_PHOTO and content_type == 'image':
directory_item(label, path) directory_item(label, path)
elif node_type in ('artists', elif node_type in (v.CONTENT_TYPE_ARTIST,
'albums', v.CONTENT_TYPE_ALBUM,
'songs') and content_type == 'audio': v.CONTENT_TYPE_SONG) and content_type == 'audio':
directory_item(label, path) directory_item(label, path)
elif node_type in ('movies', elif node_type in (v.CONTENT_TYPE_MOVIE,
'tvshows', v.CONTENT_TYPE_SHOW,
'homevideos', v.CONTENT_TYPE_MUSICVIDEO) and content_type == 'video':
'musicvideos') and content_type == 'video':
directory_item(label, path) directory_item(label, path)
elif content_type is None: elif content_type is None:
# To let the user pick this node as a WIDGET (content_type is None) # To let the user pick this node as a WIDGET (content_type is None)

View file

@ -238,11 +238,12 @@ CONTENT_TYPE_ALBUM = 'albums'
CONTENT_TYPE_SONG = 'songs' CONTENT_TYPE_SONG = 'songs'
CONTENT_TYPE_CLIP = 'movies' CONTENT_TYPE_CLIP = 'movies'
CONTENT_TYPE_SET = 'sets' CONTENT_TYPE_SET = 'sets'
CONTENT_TYPE_PHOTO = 'photos' CONTENT_TYPE_PHOTO = 'images'
CONTENT_TYPE_GENRE = 'genres' CONTENT_TYPE_GENRE = 'genres'
CONTENT_TYPE_VIDEO = 'videos' CONTENT_TYPE_VIDEO = 'videos'
CONTENT_TYPE_PLAYLIST = 'playlists' CONTENT_TYPE_PLAYLIST = 'playlists'
CONTENT_TYPE_FILE = 'files' CONTENT_TYPE_FILE = 'files'
CONTENT_TYPE_MUSICVIDEO = 'musicvideos'
KODI_VIDEOTYPES = ( KODI_VIDEOTYPES = (