From 9d97d2b78819df166a96fb982587ba5923208bfb Mon Sep 17 00:00:00 2001 From: croneter Date: Tue, 9 Jun 2020 11:25:52 +0200 Subject: [PATCH] Fix Kodi content type for images/photos --- resources/lib/entrypoint.py | 15 +++++++-------- resources/lib/variables.py | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index bdb7a4a2..7983f5f0 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -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) diff --git a/resources/lib/variables.py b/resources/lib/variables.py index a21926fe..d6458a05 100644 --- a/resources/lib/variables.py +++ b/resources/lib/variables.py @@ -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 = (