if there is only one media folder, return list_indexes() directly

This commit is contained in:
rickybiscus 2017-01-08 11:35:53 +01:00
parent 7d26333ce0
commit 3ed7b231cc
1 changed files with 6 additions and 4 deletions

10
main.py
View File

@ -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'))