add display of official/unofficial count in main artist and country folders

This commit is contained in:
bassdart 2019-02-11 14:01:14 +01:00
parent 68e46d9a64
commit 304f63907f

View file

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