Merge pull request #1187 from croneter/fix-content-type

Fix Kodi content type for images/photos
This commit is contained in:
croneter 2020-06-09 12:06:54 +02:00 committed by GitHub
commit f1a4ef35c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
# now we just only show picture nodes in the picture library video
# 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)
elif node_type in ('artists',
'albums',
'songs') and content_type == 'audio':
elif node_type in (v.CONTENT_TYPE_ARTIST,
v.CONTENT_TYPE_ALBUM,
v.CONTENT_TYPE_SONG) and content_type == 'audio':
directory_item(label, path)
elif node_type in ('movies',
'tvshows',
'homevideos',
'musicvideos') and content_type == 'video':
elif node_type in (v.CONTENT_TYPE_MOVIE,
v.CONTENT_TYPE_SHOW,
v.CONTENT_TYPE_MUSICVIDEO) and content_type == 'video':
directory_item(label, path)
elif 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_CLIP = 'movies'
CONTENT_TYPE_SET = 'sets'
CONTENT_TYPE_PHOTO = 'photos'
CONTENT_TYPE_PHOTO = 'images'
CONTENT_TYPE_GENRE = 'genres'
CONTENT_TYPE_VIDEO = 'videos'
CONTENT_TYPE_PLAYLIST = 'playlists'
CONTENT_TYPE_FILE = 'files'
CONTENT_TYPE_MUSICVIDEO = 'musicvideos'
KODI_VIDEOTYPES = (