From 304f63907f7de6a4d7a5e61fc6f66fd2bea46659 Mon Sep 17 00:00:00 2001 From: bassdart Date: Mon, 11 Feb 2019 14:01:14 +0100 Subject: [PATCH] add display of official/unofficial count in main artist and country folders --- default.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/default.py b/default.py index 449060d..fbce792 100644 --- a/default.py +++ b/default.py @@ -437,6 +437,9 @@ def showArtist(style, limit, start): maximum = len(result) for entry in result[start:end]: artist = entry['artist'] + official = int(entry['official']) + unofficial = int(entry['unofficial']) + if entry['fanart'] != "": fanart = entry['fanart'] elif entry['thumbnail'] != "": @@ -446,12 +449,12 @@ def showArtist(style, limit, start): if videoselection == "0": if entry['official'] >= "1": - addDir(artist, unidecode(artist.upper()), 'sortArtists', fanart, len(result)) + addDir("%s (%s)" % (artist, official), unidecode(artist.upper()), 'sortArtists', fanart, official) elif videoselection == "1": if entry['unofficial'] >= "1": - addDir(artist, unidecode(artist.upper()), 'sortArtists', fanart, len(result)) + addDir("%s (%s)" % (artist, unofficial), unidecode(artist.upper()), 'sortArtists', fanart, unofficial) elif videoselection == "2": - addDir(artist, unidecode(artist.upper()), 'sortArtists', fanart, len(result)) + addDir("%s (%s/%s)" % (artist, official, unofficial), unidecode(artist.upper()), 'sortArtists', fanart, len(result)) if maximum > end: fanart = 'DefaultFolder.png' addDir(translation(30036), '&style=' + style + '&limit=' + limit + '&start=' + str(nextstart), 'showArtist', fanart)