Fixed bug for trend indicators with unlimited time ranges

This commit is contained in:
Krateng 2020-08-23 01:38:56 +02:00
parent fa05c40660
commit 47087b4288
3 changed files with 27 additions and 21 deletions

View File

@ -5,7 +5,7 @@ author = {
"email":"maloja@krateng.dev",
"github": "krateng"
}
version = 2,7,5
version = 2,7,6
versionstr = ".".join(str(n) for n in version)
links = {
"pypi":"malojaserver",

View File

@ -7,7 +7,9 @@
{% if compare %}
{% if compare is true %}
{% set compare = limitkeys.timerange.next(step=-1) %}
{% if compare is none %}{% set compare = False %}{% endif %}
{% endif %}
{% if compare %}
{% set prevartists = dbp.get_charts_artists(filterkeys,{'timerange':compare}) %}
{% set lastranks = {} %}
@ -20,6 +22,7 @@
{% if a.update({'last_rank':lastranks[a.artist]}) %}{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% set firstindex = amountkeys.page * amountkeys.perpage %}

View File

@ -6,7 +6,9 @@
{% if compare %}
{% if compare is true %}
{% set compare = limitkeys.timerange.next(step=-1) %}
{% if compare is none %}{% set compare = False %}{% endif %}
{% endif %}
{% if compare %}
{% set prevtracks = dbp.get_charts_tracks(filterkeys,{'timerange':compare}) %}
{% set lastranks = {} %}
@ -19,6 +21,7 @@
{% if t.update({'last_rank':lastranks["|".join(t.track.artists)+"||"+t.track.title]}) %}{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% set firstindex = amountkeys.page * amountkeys.perpage %}