diff --git a/resources/lib/entrypoint/default.py b/resources/lib/entrypoint/default.py index c28a51f5..aa0b996f 100644 --- a/resources/lib/entrypoint/default.py +++ b/resources/lib/entrypoint/default.py @@ -159,9 +159,9 @@ def listing(): if path: if xbmc.getCondVisibility('Window.IsActive(Pictures)') and node in ('photos', 'homevideos'): directory(label, path, artwork=artwork) - elif xbmc.getCondVisibility('Window.IsActive(Videos)') and node not in ('photos', 'homevideos', 'music', 'books', 'audiobooks'): + elif xbmc.getCondVisibility('Window.IsActive(Videos)') and node not in ('photos', 'homevideos', 'music'): directory(label, path, artwork=artwork, context=context) - elif xbmc.getCondVisibility('Window.IsActive(Music)') and node in ('music', 'books', 'audiobooks'): + elif xbmc.getCondVisibility('Window.IsActive(Music)') and node in ('music'): directory(label, path, artwork=artwork, context=context) elif not xbmc.getCondVisibility('Window.IsActive(Videos) | Window.IsActive(Pictures) | Window.IsActive(Music)'): directory(label, path, artwork=artwork) @@ -231,7 +231,7 @@ def browse(media, view_id=None, folder=None, server_id=None): folder = folder.lower() if folder else None - if folder is None and media in ('homevideos', 'movies'): + if folder is None and media in ('homevideos', 'movies', 'books', 'audiobooks'): return browse_subfolders(media, view_id, server_id) if folder and folder == 'firstletter': diff --git a/resources/lib/player.py b/resources/lib/player.py index 457cf8dc..c313c6a2 100644 --- a/resources/lib/player.py +++ b/resources/lib/player.py @@ -242,7 +242,10 @@ class Player(xbmc.Player): ''' Does not seem to work in Leia?? ''' - current_file = self.getPlayingFile() + try: + current_file = self.getPlayingFile() + except Exception: + return if current_file in self.played: diff --git a/resources/lib/views.py b/resources/lib/views.py index 213b245d..850a0832 100644 --- a/resources/lib/views.py +++ b/resources/lib/views.py @@ -95,6 +95,11 @@ DYNNODES = { ('RecentlyAdded', _(33167)), ('InProgress', _(33169)), ('Favorite', _(33168)) + ], + 'music': [ + ('all', None), + ('RecentlyAdded', _(33167)), + ('Favorite', _(33168)) ] }