1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Fixed bug with chart bars

This commit is contained in:
Krateng 2020-08-23 01:30:50 +02:00
parent 439d12d87f
commit fa05c40660
5 changed files with 7 additions and 19 deletions

View File

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

View File

@ -35,11 +35,9 @@
{% import 'partials/charts_artists.jinja' as charts_artists %} {% import 'partials/charts_artists.jinja' as charts_artists %}
{{ charts_artists.charts_artists(limitkeys,amountkeys,compare=true) }} {{ charts_artists.charts_artists(limitkeys,amountkeys,compare=true) }}
{% import 'snippets/pagination.jinja' as pagination %} {% import 'snippets/pagination.jinja' as pagination %}
{{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }} {{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
{% endblock %} {% endblock %}

View File

@ -35,11 +35,9 @@
{% import 'partials/charts_tracks.jinja' as charts_tracks %} {% import 'partials/charts_tracks.jinja' as charts_tracks %}
{{ charts_tracks.charts_tracks(filterkeys,limitkeys,amountkeys,charts=charts,compare=true) }} {{ charts_tracks.charts_tracks(filterkeys,limitkeys,amountkeys,charts=charts,compare=true) }}
{% import 'snippets/pagination.jinja' as pagination %} {% import 'snippets/pagination.jinja' as pagination %}
{{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }} {{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
{% endblock %} {% endblock %}

View File

@ -2,13 +2,9 @@
{% set ranges = dbp.get_performance(filterkeys,limitkeys,delimitkeys) %} {% set ranges = dbp.get_performance(filterkeys,limitkeys,delimitkeys) %}
{% set minrank = 80 %} {% set minrank = ranges|map(attribute="rank")|reject("none")|max|default(60) %}
{% for r in ranges %} {% set minrank = minrank + 20 %}
{% if r.rank is not none and r.rank+20 > minrank %} {% if minrank < 80 %}{% set minrank = 80 %}{% endif %}
{% set minrank = r.rank+20 %}
{% endif %}
{% endfor %}
<table class="list"> <table class="list">
{% for t in ranges %} {% for t in ranges %}
@ -25,7 +21,7 @@
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

View File

@ -2,12 +2,8 @@
{% set ranges = dbp.get_pulse(filterkeys,limitkeys,delimitkeys) %} {% set ranges = dbp.get_pulse(filterkeys,limitkeys,delimitkeys) %}
{% set maxbar = 1 %} {% set maxbar = ranges|map(attribute="scrobbles")|max|default(1) %}
{% for r in ranges %} {% if maxbar < 1 %}{% set maxbar = 1 %}{% endif %}
{% if r.scrobbles > maxbar %}
{% set maxbar = r.scrobbles %}
{% endif %}
{% endfor %}
<table class="list"> <table class="list">
{% for t in ranges %} {% for t in ranges %}