From 3ed7b231cc82f0a4a51d53d8cc6ad16a83e6338c Mon Sep 17 00:00:00 2001 From: rickybiscus Date: Sun, 8 Jan 2017 11:35:53 +0100 Subject: [PATCH] if there is only one media folder, return list_indexes() directly --- main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 253a839..f5e1d9f 100644 --- a/main.py +++ b/main.py @@ -861,10 +861,12 @@ def list_folders(params): ) } listing.append(entry) - - return plugin.create_listing( - listing - ) + + if len(listing) == 1: + plugin.log('One single Media Folder found; do return listing from list_indexes()...') + return list_indexes(params) + else: + return plugin.create_listing(listing) def get_entry_playlist(item,params): image = connection.getCoverArtUrl(item.get('coverArt'))