From 852795cecd08715ca0e90db240fefbe278e3d941 Mon Sep 17 00:00:00 2001 From: Krateng Date: Thu, 5 Sep 2019 14:53:09 +0200 Subject: [PATCH] Added default picture to charts when tiles are enabled --- website/charts_artists.py | 10 ++++++---- website/charts_tracks.py | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/website/charts_artists.py b/website/charts_artists.py index e73adf9..3f4df66 100644 --- a/website/charts_artists.py +++ b/website/charts_artists.py @@ -15,9 +15,7 @@ def instructions(keys): html_filterselector = module_filterselection(keys) - topartists = "" - if get_settings("CHARTS_DISPLAY_TILES"): - topartists = module_artistcharts_tiles(timerange=timekeys["timerange"]) + html_charts, rep = module_artistcharts(**amountkeys,**timekeys) @@ -27,9 +25,13 @@ def instructions(keys): else: imgurl = "" + topartists = "" imgdiv = '
' if get_settings("CHARTS_DISPLAY_TILES"): - imgdiv = "" + topartists = module_artistcharts_tiles(timerange=timekeys["timerange"]) + imgdiv = """
""" + + pushresources = [{"file":imgurl,"type":"image"}] if imgurl.startswith("/") else [] diff --git a/website/charts_tracks.py b/website/charts_tracks.py index b576f27..db9c6c2 100644 --- a/website/charts_tracks.py +++ b/website/charts_tracks.py @@ -23,9 +23,7 @@ def instructions(keys): html_charts, rep = module_trackcharts(**amountkeys,**timekeys,**filterkeys) - toptracks = "" - if get_settings("CHARTS_DISPLAY_TILES"): - toptracks = module_trackcharts_tiles(timerange=timekeys["timerange"]) + if filterkeys.get("artist") is not None: @@ -36,9 +34,12 @@ def instructions(keys): else: imgurl = "" + toptracks = "" imgdiv = '
' if get_settings("CHARTS_DISPLAY_TILES"): - imgdiv = "" + toptracks = module_trackcharts_tiles(timerange=timekeys["timerange"]) + imgdiv = """
""" + limitstring += " " + timekeys["timerange"].desc(prefix=True)