mirror of
https://github.com/krateng/maloja.git
synced 2025-04-20 18:47:37 +03:00
Fixed bug for trend indicators with unlimited time ranges
This commit is contained in:
parent
fa05c40660
commit
47087b4288
@ -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",
|
||||
|
@ -7,19 +7,22 @@
|
||||
{% if compare %}
|
||||
{% if compare is true %}
|
||||
{% set compare = limitkeys.timerange.next(step=-1) %}
|
||||
{% if compare is none %}{% set compare = False %}{% endif %}
|
||||
{% endif %}
|
||||
{% set prevartists = dbp.get_charts_artists(filterkeys,{'timerange':compare}) %}
|
||||
{% if compare %}
|
||||
{% set prevartists = dbp.get_charts_artists(filterkeys,{'timerange':compare}) %}
|
||||
|
||||
{% set lastranks = {} %}
|
||||
{% for a in prevartists %}
|
||||
{% if lastranks.update({a.artist:a.rank}) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set lastranks = {} %}
|
||||
{% for a in prevartists %}
|
||||
{% if lastranks.update({a.artist:a.rank}) %}{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for a in charts %}
|
||||
{% if a.artist in lastranks %}
|
||||
{% if a.update({'last_rank':lastranks[a.artist]}) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for a in charts %}
|
||||
{% if a.artist in lastranks %}
|
||||
{% if a.update({'last_rank':lastranks[a.artist]}) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% set firstindex = amountkeys.page * amountkeys.perpage %}
|
||||
|
@ -6,19 +6,22 @@
|
||||
{% if compare %}
|
||||
{% if compare is true %}
|
||||
{% set compare = limitkeys.timerange.next(step=-1) %}
|
||||
{% if compare is none %}{% set compare = False %}{% endif %}
|
||||
{% endif %}
|
||||
{% set prevtracks = dbp.get_charts_tracks(filterkeys,{'timerange':compare}) %}
|
||||
{% if compare %}
|
||||
{% set prevtracks = dbp.get_charts_tracks(filterkeys,{'timerange':compare}) %}
|
||||
|
||||
{% set lastranks = {} %}
|
||||
{% for t in prevtracks %}
|
||||
{% if lastranks.update({"|".join(t.track.artists)+"||"+t.track.title:t.rank}) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set lastranks = {} %}
|
||||
{% for t in prevtracks %}
|
||||
{% if lastranks.update({"|".join(t.track.artists)+"||"+t.track.title:t.rank}) %}{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for t in charts %}
|
||||
{% if "|".join(t.track.artists)+"||"+t.track.title in lastranks %}
|
||||
{% if t.update({'last_rank':lastranks["|".join(t.track.artists)+"||"+t.track.title]}) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for t in charts %}
|
||||
{% if "|".join(t.track.artists)+"||"+t.track.title in lastranks %}
|
||||
{% if t.update({'last_rank':lastranks["|".join(t.track.artists)+"||"+t.track.title]}) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% set firstindex = amountkeys.page * amountkeys.perpage %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user