diff --git a/htmlmodules.py b/htmlmodules.py
index bbf0a60..3f45fc4 100644
--- a/htmlmodules.py
+++ b/htmlmodules.py
@@ -167,7 +167,7 @@ def module_artistcharts(max_=None,**kwargs):
-def module_toptracks(**kwargs):
+def module_toptracks(pictures=True,**kwargs):
kwargs_filter = pickKeys(kwargs,"artist","associated")
kwargs_time = pickKeys(kwargs,"since","to","within","step","stepn","trail")
@@ -194,11 +194,15 @@ def module_toptracks(**kwargs):
html += "
" + range_desc(e["from"],e["to"],short=True) + " | "
if e["track"] is None:
+ if pictures:
+ html += " | "
html += "" + "No scrobbles" + " | "
html += "" + "" + " | "
html += "" + "0" + " | "
html += "" + "" + " | "
else:
+ if pictures:
+ html += """ | """
html += "" + artistLinks(e["track"]["artists"]) + " | "
html += "" + trackLink(e["track"]) + " | "
html += "" + scrobblesTrackLink(e["track"],{"since":fromstr,"to":tostr},amount=e["scrobbles"]) + " | "
@@ -209,7 +213,7 @@ def module_toptracks(**kwargs):
return (html,representative)
-def module_topartists(**kwargs):
+def module_topartists(pictures=True,**kwargs):
kwargs_time = pickKeys(kwargs,"since","to","within","step","stepn","trail")
@@ -234,11 +238,16 @@ def module_topartists(**kwargs):
html += "" + range_desc(e["from"],e["to"],short=True) + " | "
+
if e["artist"] is None:
+ if pictures:
+ html += " | "
html += "" + "No scrobbles" + " | "
html += "" + "0" + " | "
html += "" + "" + " | "
else:
+ if pictures:
+ html += """ | """
html += "" + artistLink(e["artist"])
if (e["counting"] != []):
html += " "
|