6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Version {{ pkginfo.VERSION }}
16 | {# {% if adminmode %}
17 | Python {{ platform.sys.version }}
18 | {{ platform.system() }} {{ platform.release() }} ({{ platform.machine() }})
19 |
20 | {% set pid = psutil.os.getpid() %}
21 | {% set proc = psutil.Process(pid) %}
22 | CPU:
23 | {{ proc.cpu_percent() | int }}% Maloja,
24 | {{ (psutil.getloadavg()[2]/psutil.os.cpu_count() * 100) | int }}% System
25 |
26 | RAM:
27 | {{ (proc.memory_info().rss / (1024*1024)) | int }}MB Maloja ({{ proc.memory_percent() | int }}%),
28 | {{ (psutil.virtual_memory().used / (1024*1024)) | int }}MB System ({{ psutil.virtual_memory().percent | int }}%)
29 | {% endif %} #}
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | Get your own Maloja server:
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | Maloja is released under the GNU General Public License v3.0 .
54 |
55 | {% endblock %}
56 |
--------------------------------------------------------------------------------
/maloja/web/jinja/abstracts/admin.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - Backend{% endblock %}
3 |
4 |
5 | {% block content %}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Admin Panel
17 |
18 |
19 | {% for tab_url,tab_name in [
20 | ['overview','Overview'],
21 | ['setup','Server Setup'],
22 | ['settings','Settings'],
23 | ['apikeys','API Keys'],
24 | ['manual','Manual Scrobbling'],
25 | ['albumless','Tracks without Albums']
26 |
27 | ] %}
28 | {# ['import','Scrobble Import'],
29 | ['issues','Database Maintenance']
30 | hide for now #}
31 | {% if page=='admin_' + tab_url %}
32 | {{ tab_name }}
33 | {% else %}
34 | {{ tab_name }}
35 | {% endif %} {%- if not loop.last %}|{% endif %}
36 | {% endfor %}
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | {% block maincontent %}
47 | {% endblock %}
48 | {% endblock %}
49 |
--------------------------------------------------------------------------------
/maloja/web/jinja/admin_albumless.jinja:
--------------------------------------------------------------------------------
1 | {% set page ='admin_albumless' %}
2 | {% extends "abstracts/admin.jinja" %}
3 | {% block title %}Maloja - Albumless Tracks{% endblock %}
4 |
5 | {% block maincontent %}
6 | Here you can find tracks that currently have no album.
7 |
8 | {% with list = dbc.get_tracks_without_album() %}
9 | You have {{list|length}} tracks with no album.
10 |
11 | {% include 'partials/list_tracks.jinja' %}
12 | {% endwith %}
13 |
14 | {% endblock %}
15 |
--------------------------------------------------------------------------------
/maloja/web/jinja/admin_apikeys.jinja:
--------------------------------------------------------------------------------
1 | {% set page ='admin_apikeys' %}
2 | {% extends "abstracts/admin.jinja" %}
3 | {% block title %}Maloja - API Keys{% endblock %}
4 |
5 |
6 | {% block maincontent %}
7 | Here you can add and remove API keys used by your scrobblers. It is recommended to use
8 | a different key for each scrobbler.
9 | {{ apikeys.html() }}
10 | {% endblock %}
11 |
--------------------------------------------------------------------------------
/maloja/web/jinja/admin_import.jinja:
--------------------------------------------------------------------------------
1 | {% set page ='admin_import' %}
2 | {% extends "abstracts/admin.jinja" %}
3 | {% block title %}Maloja - Import Scrobbles{% endblock %}
4 |
5 |
6 | {% block scripts %}
7 |
13 | {% endblock %}
14 |
15 |
16 | {% block maincontent %}
17 | You can import your scrobbles from other platforms. This will not overwrite scrobbles you've already made,
18 | unless they are deemed to be equivalent (exact same timestamp). Importing multiple times from the same
19 | source should also not lead to any duplicates.
20 |
21 | {% for importsource in thirdparty.services.import %}
22 | {{ importsource.name }}
23 |
24 | Import
25 |
26 | {% endfor %}
27 |
28 | {% endblock %}
29 |
--------------------------------------------------------------------------------
/maloja/web/jinja/admin_issues.jinja:
--------------------------------------------------------------------------------
1 | {% set page ='admin_issues' %}
2 | {% extends "abstracts/admin.jinja" %}
3 | {% block title %}Maloja - Issues{% endblock %}
4 |
5 | {% import 'snippets/links.jinja' as links %}
6 |
7 | {% block scripts %}
8 |
34 | {% endblock %}
35 |
36 | {% set issuedata = dbc.issues() %}
37 |
38 | {% block maincontent %}
39 |
40 |
41 | Maloja can identify possible problems with consistency or redundancy in your library. After making any changes, you should rebuild your library .
42 |
43 |
44 |
45 | {% if issuedata.inconsistent %}
46 |
47 | The current database wasn't built with all current rules in effect. Any problem below might be a false alarm and fixing it could create redundant rules.
48 | Rebuild the database
49 |
50 | {% endif %}
51 |
52 | {% for issue in issuedata.duplicates %}
53 |
54 | {{ links.link(issue[0]) }} is a possible duplicate of {{ links.link(issue[1]) }}
55 |
56 | {{ issue[1] }} is correct
57 |
58 |
59 | {{ issue[0] }} is correct
60 |
61 |
62 | {% endfor %}
63 |
64 | {% for issue in issuedata.combined %}
65 |
66 | {{ links.link(issue[0]) }} sounds like the combination of {{ issue[1].__len__() }} artists:
67 | {{ issue[1]|join(", ") }}
68 |
69 |
70 | Fix it
71 |
72 |
73 | {% endfor %}
74 |
75 | {% for issue in issuedata.newartists %}
76 |
77 | Is '{{ issue[0] }}' in '{{ links.link(issue[1]) }}' an artist?
78 |
79 | Yes
80 |
81 |
82 | {% endfor %}
83 |
84 |
85 |
86 | {% endblock %}
87 |
--------------------------------------------------------------------------------
/maloja/web/jinja/admin_manual.jinja:
--------------------------------------------------------------------------------
1 | {% set page ='admin_manual' %}
2 | {% extends "abstracts/admin.jinja" %}
3 | {% block title %}Maloja - Manual Scrobbling{% endblock %}
4 |
5 | {% block scripts %}
6 |
7 |
15 | {% endblock %}
16 |
17 |
18 | {% block maincontent %}
19 |
20 | Scrobble new discovery
21 |
22 |
62 |
63 |
68 |
69 |
70 |
71 |
72 | Use track artists as album artists fallback
73 |
74 |
75 |
76 | Scrobble!
77 | ↻
78 |
79 |
80 |
81 |
82 |
83 | Search
84 |
85 |
86 |
87 |
88 |
89 |
90 | {% endblock %}
91 |
--------------------------------------------------------------------------------
/maloja/web/jinja/admin_settings.jinja:
--------------------------------------------------------------------------------
1 | {% set page ='admin_settings' %}
2 | {% extends "abstracts/admin.jinja" %}
3 | {% block title %}Maloja - Settings{% endblock %}
4 |
5 |
6 | {% block maincontent %}
7 | {{ settings.html() }}
8 | {% endblock %}
9 |
--------------------------------------------------------------------------------
/maloja/web/jinja/charts_albums.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - Album Charts{% endblock %}
3 |
4 | {% import 'snippets/links.jinja' as links %}
5 | {% import 'snippets/filterdescription.jinja' as filterdesc %}
6 |
7 | {% block scripts %}
8 |
9 | {% endblock %}
10 |
11 | {% set charts = dbc.get_charts_albums(filterkeys,limitkeys,{'only_own_albums':False}) %}
12 | {% set pages = math.ceil(charts.__len__() / amountkeys.perpage) %}
13 | {% if charts[0] is defined %}
14 | {% set topalbum = charts[0].album %}
15 | {% set img = images.get_album_image(topalbum) %}
16 | {% else %}
17 | {% set img = "/favicon.png" %}
18 | {% endif %}
19 |
20 |
21 | {% block content %}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | Album Charts View #1 Albums
30 | {{ filterdesc.desc(filterkeys,limitkeys) }}
31 |
32 | {% with delimitkeys = {} %}
33 | {% include 'snippets/timeselection.jinja' %}
34 | {% endwith %}
35 |
36 |
37 |
38 |
39 |
40 | {% if settings['CHARTS_DISPLAY_TILES'] %}
41 | {% include 'partials/charts_albums_tiles.jinja' %}
42 |
43 | {% endif %}
44 |
45 | {% with compare=true %}
46 | {% include 'partials/charts_albums.jinja' %}
47 | {% endwith %}
48 |
49 | {% import 'snippets/pagination.jinja' as pagination %}
50 | {{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
51 |
52 | {% endblock %}
53 |
--------------------------------------------------------------------------------
/maloja/web/jinja/charts_artists.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - Artist Charts{% endblock %}
3 |
4 | {% import 'snippets/filterdescription.jinja' as filterdesc %}
5 |
6 | {% block scripts %}
7 |
8 | {% endblock %}
9 |
10 | {% set charts = dbc.get_charts_artists(filterkeys,limitkeys,specialkeys) %}
11 |
12 |
13 |
14 | {% set pages = math.ceil(charts.__len__() / amountkeys.perpage) %}
15 | {% if charts[0] is defined %}
16 | {% set topartist = charts[0].artist %}
17 | {% set img = images.get_artist_image(topartist) %}
18 | {% else %}
19 | {% set img = "/favicon.png" %}
20 | {% endif %}
21 |
22 |
23 |
24 | {% block content %}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Artist Charts View #1 Artists
33 | {{ filterdesc.desc(filterkeys,limitkeys) }}
34 |
35 | {% with delimitkeys = {}, artistchart=True %}
36 | {% include 'snippets/timeselection.jinja' %}
37 | {% endwith %}
38 |
39 |
40 |
41 |
42 |
43 | {% if settings['CHARTS_DISPLAY_TILES'] %}
44 | {% include 'partials/charts_artists_tiles.jinja' %}
45 |
46 | {% endif %}
47 |
48 | {% with compare=true %}
49 | {% include 'partials/charts_artists.jinja' %}
50 | {% endwith %}
51 |
52 | {% import 'snippets/pagination.jinja' as pagination %}
53 | {{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
54 |
55 | {% endblock %}
56 |
--------------------------------------------------------------------------------
/maloja/web/jinja/charts_tracks.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - Track Charts{% endblock %}
3 |
4 | {% import 'snippets/links.jinja' as links %}
5 | {% import 'snippets/filterdescription.jinja' as filterdesc %}
6 |
7 | {% block scripts %}
8 |
9 | {% endblock %}
10 |
11 | {% set charts = dbc.get_charts_tracks(filterkeys,limitkeys) %}
12 | {% set pages = math.ceil(charts.__len__() / amountkeys.perpage) %}
13 | {% if charts[0] is defined %}
14 | {% set toptrack = charts[0].track %}
15 | {% set img = images.get_track_image(toptrack) %}
16 | {% else %}
17 | {% set img = "/favicon.png" %}
18 | {% endif %}
19 |
20 |
21 | {% block content %}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | Track Charts View #1 Tracks
30 | {{ filterdesc.desc(filterkeys,limitkeys) }}
31 |
32 | {% with delimitkeys = {} %}
33 | {% include 'snippets/timeselection.jinja' %}
34 | {% endwith %}
35 |
36 |
37 |
38 |
39 |
40 | {% if settings['CHARTS_DISPLAY_TILES'] %}
41 | {% include 'partials/charts_tracks_tiles.jinja' %}
42 |
43 | {% endif %}
44 |
45 | {% with compare=true %}
46 | {% include 'partials/charts_tracks.jinja' %}
47 | {% endwith %}
48 |
49 | {% import 'snippets/pagination.jinja' as pagination %}
50 | {{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
51 |
52 | {% endblock %}
53 |
--------------------------------------------------------------------------------
/maloja/web/jinja/error.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - Error{% endblock %}
3 |
4 | {% block content %}
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{ error_desc | e }}
12 | {{ error_full_desc | e }}
13 |
14 |
15 |
16 |
17 |
18 |
19 | Kazuma, Aqua, Darkness and Megumin have been dispatched to deal with this situation.
20 | {% if adminmode %}
21 | You are only seeing this information because you are in admin mode:
22 |
23 | {% autoescape true -%}
24 | {{ traceback }}
25 | {%- endautoescape %}
26 |
27 | If you think this shouldn't have happened, consider
28 | opening an issue
29 | describing the situation.
30 | {% endif %}
31 |
32 |
33 | {% endblock %}
34 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/LICENSE-octicons:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 GitHub Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/add_album.jinja:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/add_album_confirm.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/add_artist.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/add_artist_confirm.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/association_cancel.jinja:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/association_mark.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/association_unmark.jinja:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/cert_album.jinja:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
10 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/cert_track.jinja:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
10 |
12 |
15 |
21 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/delete.jinja:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/disassociate.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/edit.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/merge.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/merge_cancel.jinja:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/merge_mark.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/merge_unmark.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/nodata.jinja:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
No scrobbles yet!
7 |
8 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/remove_album.jinja:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/remove_artist.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/reparse.jinja:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/maloja/web/jinja/icons/settings.jinja:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/album_showcase.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 |
4 |
5 |
6 |
7 | {% for entry in dbc.get_charts_albums(filterkeys,limitkeys,{'only_own_albums':True}) %}
8 |
9 | {%- set cert = None -%}
10 | {%- if entry.scrobbles >= settings.scrobbles_gold_album -%}{% set cert = 'gold' %}{%- endif -%}
11 | {%- if entry.scrobbles >= settings.scrobbles_platinum_album -%}{% set cert = 'platinum' %}{%- endif -%}
12 | {%- if entry.scrobbles >= settings.scrobbles_diamond_album -%}{% set cert = 'diamond' %}{%- endif -%}
13 |
14 |
15 |  
16 |
17 |
18 |
19 |
20 |
21 |
22 | {{ links.links(entry.album.artists) }}
23 | {{ links.link(entry.album) }}
24 |
25 |
26 |
27 | {% endfor %}
28 |
29 | {% for entry in dbc.get_charts_albums(filterkeys,limitkeys,{'only_own_albums':False}) %}
30 |
31 |
32 | {% if info.artist not in (entry.album.artists or []) %}
33 |
34 | {%- set cert = None -%}
35 | {%- if entry.scrobbles >= settings.scrobbles_gold_album -%}{% set cert = 'gold' %}{%- endif -%}
36 | {%- if entry.scrobbles >= settings.scrobbles_platinum_album -%}{% set cert = 'platinum' %}{%- endif -%}
37 | {%- if entry.scrobbles >= settings.scrobbles_diamond_album -%}{% set cert = 'diamond' %}{%- endif -%}
38 |
39 |
40 | Appears on
41 |
42 |
43 |
44 |
45 |
46 |
47 | {{ links.links(entry.album.artists) }}
48 | {{ links.link(entry.album) }}
49 |
50 |
51 |
52 |
53 | {% endif %}
54 | {% endfor %}
55 |
56 |
57 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/awards_album.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 | {% macro medals(info) %}
4 |
5 |
6 | {% for year in info.medals.gold -%}
7 |
8 | {{ year }}
9 |
10 | {%- endfor %}
11 | {% for year in info.medals.silver -%}
12 |
13 | {{ year }}
14 |
15 | {%- endfor %}
16 | {% for year in info.medals.bronze -%}
17 |
18 | {{ year }}
19 |
20 | {%- endfor %}
21 |
22 | {% if info.medals.gold or info.medals.silver or info.medals.bronze %}
23 |
24 | {% endif %}
25 |
26 | {%- endmacro %}
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | {% macro topweeks(info) %}
36 |
37 | {% set encodedalbum = mlj_uri.uriencode({'album':info.album}) %}
38 |
39 |
40 |
41 | {% if info.topweeks > 0 -%}
42 |
43 | {{ info.topweeks }}
44 | {%- endif %}
45 |
46 |
47 | {% if info.topweeks > 0 %}
48 |
49 | {% endif %}
50 |
51 | {%- endmacro %}
52 |
53 |
54 |
55 | {% macro subcerts(album) %}
56 |
57 |
58 |
59 | {% set charts = dbc.get_charts_tracks({'album':album.album,'timerange':malojatime.alltime()}) %}
60 | {% for e in charts -%}
61 | {%- if e.scrobbles >= settings.scrobbles_gold -%}{% set cert = 'gold' %}{%- endif -%}
62 | {%- if e.scrobbles >= settings.scrobbles_platinum -%}{% set cert = 'platinum' %}{%- endif -%}
63 | {%- if e.scrobbles >= settings.scrobbles_diamond -%}{% set cert = 'diamond' %}{%- endif -%}
64 |
65 | {%- if cert -%}
66 |
67 | {% include 'icons/cert_track.jinja' %}
68 |
69 | {%- endif %}
70 |
71 | {%- endfor %}
72 |
73 | {%- endmacro %}
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/awards_artist.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 |
4 | {% macro medals(info) %}
5 |
6 |
7 | {% for year in info.medals.gold -%}
8 |
9 | {{ year }}
10 |
11 | {%- endfor %}
12 | {% for year in info.medals.silver -%}
13 |
14 | {{ year }}
15 |
16 | {%- endfor %}
17 | {% for year in info.medals.bronze -%}
18 |
19 | {{ year }}
20 |
21 | {%- endfor %}
22 |
23 | {% if info.medals.gold or info.medals.silver or info.medals.bronze %}
24 |
25 | {% endif %}
26 |
27 | {%- endmacro %}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | {% macro topweeks(info) %}
37 |
38 | {% set encodedartist = mlj_uri.uriencode({'artist':info.artist}) %}
39 |
40 |
41 |
42 |
43 | {% if info.topweeks > 0 -%}
44 |
45 | {{ info.topweeks }}
46 | {%- endif %}
47 |
48 |
49 | {% if info.topweeks > 0 %}
50 |
51 | {% endif %}
52 |
53 | {%- endmacro %}
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | {% macro subcerts(artist) %}
64 |
65 |
66 |
67 |
68 | {% set albumcharts = dbc.get_charts_albums({'artist':artist,'timerange':malojatime.alltime(),'resolve_ids':True,'only_own_albums':True}) %}
69 | {% for e in albumcharts -%}
70 | {%- if e.scrobbles >= settings.scrobbles_gold_album -%}{% set cert = 'gold' %}{%- endif -%}
71 | {%- if e.scrobbles >= settings.scrobbles_platinum_album -%}{% set cert = 'platinum' %}{%- endif -%}
72 | {%- if e.scrobbles >= settings.scrobbles_diamond_album -%}{% set cert = 'diamond' %}{%- endif -%}
73 |
74 | {%- if cert -%}
75 |
76 | {% include 'icons/cert_album.jinja' %}
77 |
78 | {%- endif %}
79 |
80 | {%- endfor %}
81 |
82 |
83 | {% set charts = dbc.get_charts_tracks({'artist':artist,'timerange':malojatime.alltime()}) %}
84 | {% for e in charts -%}
85 | {%- if e.scrobbles >= settings.scrobbles_gold -%}{% set cert = 'gold' %}{%- endif -%}
86 | {%- if e.scrobbles >= settings.scrobbles_platinum -%}{% set cert = 'platinum' %}{%- endif -%}
87 | {%- if e.scrobbles >= settings.scrobbles_diamond -%}{% set cert = 'diamond' %}{%- endif -%}
88 |
89 | {%- if cert -%}
90 |
91 | {% include 'icons/cert_track.jinja' %}
92 |
93 | {%- endif %}
94 |
95 | {%- endfor %}
96 |
97 |
98 |
99 | {%- endmacro %}
100 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/awards_track.jinja:
--------------------------------------------------------------------------------
1 | {% macro medals(info) %}
2 |
3 |
4 | {% for year in info.medals.gold -%}
5 |
6 | {{ year }}
7 |
8 | {%- endfor %}
9 | {% for year in info.medals.silver -%}
10 |
11 | {{ year }}
12 |
13 | {%- endfor %}
14 | {% for year in info.medals.bronze -%}
15 |
16 | {{ year }}
17 |
18 | {%- endfor %}
19 |
20 | {% if info.medals.gold or info.medals.silver or info.medals.bronze %}
21 |
22 | {% endif %}
23 |
24 | {%- endmacro %}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | {% macro topweeks(info) %}
34 |
35 | {% set encodedtrack = mlj_uri.uriencode({'track':info.track}) %}
36 |
37 |
38 |
39 | {% if info.topweeks > 0 %}
40 |
41 | {{ info.topweeks }}
42 |
43 | {% endif %}
44 |
45 |
46 | {% if info.topweeks > 0 %}
47 |
48 | {% endif %}
49 |
50 | {%- endmacro %}
51 |
52 |
53 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/charts_albums.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 | {% import 'snippets/entityrow.jinja' as entityrow %}
3 |
4 | {% if charts is undefined %}
5 | {% set charts = dbc.get_charts_albums(filterkeys,limitkeys,{'only_own_albums':False}) %}
6 | {% endif %}
7 | {% if compare %}
8 | {% if compare is true %}
9 | {% set compare = limitkeys.timerange.next(step=-1) %}
10 | {% if compare is none %}{% set compare = False %}{% endif %}
11 | {% endif %}
12 | {% if compare %}
13 | {% set prevalbums = dbc.get_charts_albums(filterkeys,{'timerange':compare}) %}
14 |
15 | {% set lastranks = {} %}
16 | {% for t in prevalbums %}
17 | {% if lastranks.update({"|".join(t.album.artists or [])+"||"+t.album.albumtitle:t.rank}) %}{% endif %}
18 | {% endfor %}
19 |
20 | {% for t in charts %}
21 | {% if "|".join(t.album.artists or [])+"||"+t.album.albumtitle in lastranks %}
22 | {% if t.update({'last_rank':lastranks["|".join(t.album.artists or [])+"||"+t.album.albumtitle]}) %}{% endif %}
23 | {% endif %}
24 | {% endfor %}
25 | {% endif %}
26 | {% endif %}
27 |
28 | {% set firstindex = amountkeys.page * amountkeys.perpage %}
29 | {% set lastindex = firstindex + amountkeys.perpage %}
30 |
31 |
32 | {% set maxbar = charts[0]['scrobbles'] if charts != [] else 0 %}
33 |
34 | {% for e in charts %}
35 | {% if loop.index0 >= firstindex and loop.index0 < lastindex %}
36 |
37 |
38 | {%if loop.changed(e.scrobbles) %}#{{ e.rank }}{% endif %}
39 |
40 | {% if compare %}
41 | {% if e.last_rank is undefined %}🆕
42 | {% elif e.last_rank < e.rank %}↘
43 | {% elif e.last_rank > e.rank %}↗
44 | {% elif e.last_rank == e.rank %}➡
45 | {% endif %}
46 | {% endif %}
47 |
48 |
49 | {{ entityrow.row(e['album'],adminmode=adminmode) }}
50 |
51 |
52 | {{ links.link_scrobbles([{'album':e.album,'timerange':limitkeys.timerange}],amount=e['scrobbles']) }}
53 | {{ links.link_scrobbles([{'album':e.album,'timerange':limitkeys.timerange}],percent=e['scrobbles']*100/maxbar) }}
54 |
55 | {% endif %}
56 | {% endfor %}
57 |
58 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/charts_albums_tiles.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 |
4 | {% if charts is undefined %}
5 | {% set charts = dbc.get_charts_albums(filterkeys,limitkeys,{'only_own_albums':True}) %}
6 | {% endif %}
7 |
8 | {% set charts_14 = charts | fixlength(14) %}
9 |
10 |
11 |
12 | {% if charts_14[0] is none %}
13 | {% include 'icons/nodata.jinja' %}
14 | {% endif %}
15 | {% for entry in charts_14 %}
16 | {% if entry is not none %}
17 | {% set album = entry.album %}
18 | {% set rank = entry.rank %}
19 | {% set scrobbles = entry.scrobbles %}
20 |
30 | {% else %}
31 |
32 | {% endif %}
33 | {% endfor %}
34 |
35 |
36 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/charts_artists.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 | {% import 'snippets/entityrow.jinja' as entityrow %}
3 |
4 | {% if charts is undefined %}
5 | {% set charts = dbc.get_charts_artists(limitkeys,specialkeys) %}
6 | {% endif %}
7 |
8 | {% if compare %}
9 | {% if compare is true %}
10 | {% set compare = limitkeys.timerange.next(step=-1) %}
11 | {% if compare is none %}{% set compare = False %}{% endif %}
12 | {% endif %}
13 | {% if compare %}
14 | {% set prevartists = dbc.get_charts_artists({'timerange':compare},specialkeys) %}
15 |
16 | {% set lastranks = {} %}
17 | {% for a in prevartists %}
18 | {% if lastranks.update({a.artist:a.rank}) %}{% endif %}
19 | {% endfor %}
20 |
21 | {% for a in charts %}
22 | {% if a.artist in lastranks %}
23 | {% if a.update({'last_rank':lastranks[a.artist]}) %}{% endif %}
24 | {% endif %}
25 | {% endfor %}
26 | {% endif %}
27 | {% endif %}
28 |
29 | {% set firstindex = amountkeys.page * amountkeys.perpage %}
30 | {% set lastindex = firstindex + amountkeys.perpage %}
31 |
32 |
33 |
34 | {% set maxbar = charts[0]['scrobbles'] if charts != [] else 0 %}
35 |
36 |
37 | {% for e in charts %}
38 | {% if loop.index0 >= firstindex and loop.index0 < lastindex %}
39 |
40 |
41 | {%if loop.changed(e.scrobbles) %}#{{ e.rank }}{% endif %}
42 |
43 | {% if compare %}
44 | {% if e.last_rank is undefined %}🆕
45 | {% elif e.last_rank < e.rank %}↘
46 | {% elif e.last_rank > e.rank %}↗
47 | {% elif e.last_rank == e.rank %}➡
48 | {% endif %}
49 | {% endif %}
50 |
51 |
52 | {{ entityrow.row(e['artist'],adminmode=adminmode,counting=([] if specialkeys.separate else e.associated_artists)) }}
53 |
54 |
55 | {{ links.link_scrobbles([{'artist':e['artist'],'associated':(not specialkeys.separate),'timerange':limitkeys.timerange}],amount=e['scrobbles']) }}
56 |
57 | {{ links.link_scrobbles([{'artist':e['artist'],'associated':False,'timerange':limitkeys.timerange}],percent=e['real_scrobbles']*100/maxbar) }}
58 | {%- if e['real_scrobbles'] != e['scrobbles'] -%}
59 | {{ links.link_scrobbles([{'artist':e['artist'],'associated':True,'timerange':limitkeys.timerange}],percent=(e['scrobbles']-e['real_scrobbles'])*100/maxbar) }}
60 | {%- endif %}
61 |
62 |
63 | {% endif %}
64 | {% endfor %}
65 |
66 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/charts_artists_tiles.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 |
4 | {% if charts is undefined %}
5 | {% set charts = dbc.get_charts_artists(limitkeys) %}
6 | {% endif %}
7 |
8 | {% set charts_14 = charts | fixlength(14) %}
9 |
10 |
11 |
12 | {% if charts_14[0] is none %}
13 | {% include 'icons/nodata.jinja' %}
14 | {% endif %}
15 | {% for entry in charts_14 %}
16 | {% if entry is not none %}
17 | {% set artist = entry.artist %}
18 | {% set rank = entry.rank %}
19 | {% set scrobbles = entry.scrobbles %}
20 |
30 | {% else %}
31 |
32 | {% endif %}
33 | {% endfor %}
34 |
35 |
36 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/charts_tracks.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 | {% import 'snippets/entityrow.jinja' as entityrow %}
3 |
4 | {% if charts is undefined %}
5 | {% set charts = dbc.get_charts_tracks(filterkeys,limitkeys) %}
6 | {% endif %}
7 | {% if compare %}
8 | {% if compare is true %}
9 | {% set compare = limitkeys.timerange.next(step=-1) %}
10 | {% if compare is none %}{% set compare = False %}{% endif %}
11 | {% endif %}
12 | {% if compare %}
13 | {% set prevtracks = dbc.get_charts_tracks(filterkeys,{'timerange':compare}) %}
14 |
15 | {% set lastranks = {} %}
16 | {% for t in prevtracks %}
17 | {% if lastranks.update({"|".join(t.track.artists)+"||"+t.track.title:t.rank}) %}{% endif %}
18 | {% endfor %}
19 |
20 | {% for t in charts %}
21 | {% if "|".join(t.track.artists)+"||"+t.track.title in lastranks %}
22 | {% if t.update({'last_rank':lastranks["|".join(t.track.artists)+"||"+t.track.title]}) %}{% endif %}
23 | {% endif %}
24 | {% endfor %}
25 | {% endif %}
26 | {% endif %}
27 |
28 | {% set firstindex = amountkeys.page * amountkeys.perpage %}
29 | {% set lastindex = firstindex + amountkeys.perpage %}
30 |
31 |
32 | {% set maxbar = charts[0]['scrobbles'] if charts != [] else 0 %}
33 |
34 | {% for e in charts %}
35 | {% if loop.index0 >= firstindex and loop.index0 < lastindex %}
36 |
37 |
38 | {%if loop.changed(e.scrobbles) %}#{{ e.rank }}{% endif %}
39 |
40 | {% if compare %}
41 | {% if e.last_rank is undefined %}🆕
42 | {% elif e.last_rank < e.rank %}↘
43 | {% elif e.last_rank > e.rank %}↗
44 | {% elif e.last_rank == e.rank %}➡
45 | {% endif %}
46 | {% endif %}
47 |
48 |
49 | {{ entityrow.row(e['track'],adminmode=adminmode) }}
50 |
51 |
52 | {{ links.link_scrobbles([{'track':e.track,'timerange':limitkeys.timerange}],amount=e['scrobbles']) }}
53 | {{ links.link_scrobbles([{'track':e.track,'timerange':limitkeys.timerange}],percent=e['scrobbles']*100/maxbar) }}
54 |
55 | {% endif %}
56 | {% endfor %}
57 |
58 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/charts_tracks_tiles.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 |
4 | {% if charts is undefined %}
5 | {% set charts = dbc.get_charts_tracks(filterkeys,limitkeys) %}
6 | {% endif %}
7 |
8 | {% set charts_14 = charts | fixlength(14) %}
9 |
10 |
11 |
12 | {% if charts_14[0] is none %}
13 | {% include 'icons/nodata.jinja' %}
14 | {% endif %}
15 | {% for entry in charts_14 %}
16 | {% if entry is not none %}
17 | {% set track = entry.track %}
18 | {% set rank = entry.rank %}
19 | {% set scrobbles = entry.scrobbles %}
20 |
30 | {% else %}
31 |
32 | {% endif %}
33 | {% endfor %}
34 |
35 |
36 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/info_album.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 | {% import 'partials/awards_album.jinja' as awards with context %}
3 |
4 | {% set album = filterkeys.album %}
5 | {% set info = dbc.album_info({'album':album}) %}
6 | {% set encodedalbum = mlj_uri.uriencode({'album':album}) %}
7 |
8 |
9 |
46 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/info_artist.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 | {% import 'partials/awards_artist.jinja' as awards with context %}
3 |
4 |
5 | {% set artist = filterkeys.artist %}
6 | {% set info = dbc.artist_info({'artist':artist}) %}
7 | {% set encodedartist = mlj_uri.uriencode({'artist':artist}) %}
8 |
9 | {% set credited = info.get('replace') %}
10 | {% set included = info.get('associated') %}
11 |
12 | {% if credited is not none %}
13 | {% set competes = false %}
14 | {% else %}
15 | {% set credited = artist %}
16 | {% set competes = true %}
17 | {% endif %}
18 |
19 |
20 |
21 |
22 |
23 | {% if adminmode %}
24 |
29 | {% else %}
30 |
31 |
32 | {% endif %}
33 |
34 |
35 | {% if condensed %}{% endif %}
36 | {{ info.artist | e }}
37 | {%- if condensed -%} {% endif %}
38 | {% if competes and info['scrobbles']>0 %}#{{ info.position }} {% endif %}
39 |
40 | {% if competes and included and (not condensed) %}
41 | associated: {{ links.links(included) }}
42 | {% elif not competes %}
43 | Competing under {{ links.link(credited) }} (#{{ info.position }})
44 | {% endif %}
45 |
46 |
47 | {{ info['scrobbles'] }} Scrobbles
48 |
49 |
50 |
51 |
52 |
53 | {% if competes %}
54 | {{ awards.medals(info) }}
55 | {{ awards.topweeks(info) }}
56 | {% endif %}
57 | {{ awards.subcerts(artist) }}
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/info_track.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 | {% set track = filterkeys.track %}
4 | {% set info = dbc.track_info({'track':track}) %}
5 | {% set encodedtrack = mlj_uri.uriencode({'track':track}) %}
6 |
7 | {% import 'partials/awards_track.jinja' as awards with context %}
8 |
9 |
50 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/list_tracks.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 | {% import 'snippets/entityrow.jinja' as entityrow %}
3 |
4 |
5 |
6 | {% set firstindex = amountkeys.page * amountkeys.perpage %}
7 | {% set lastindex = firstindex + amountkeys.perpage %}
8 |
9 |
10 |
11 | {% for e in list %}
12 | {% if loop.index0 >= firstindex and loop.index0 < lastindex %}
13 |
14 |
15 |
16 | {{ entityrow.row(e['track'],adminmode=adminmode) }}
17 |
18 |
19 | {% endif %}
20 | {% endfor %}
21 |
22 |
23 |
28 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/performance.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 | {% set ranges = dbc.get_performance(filterkeys,limitkeys,delimitkeys,specialkeys) %}
4 |
5 | {% set minrank = ranges|map(attribute="rank")|reject("none")|max|default(60) %}
6 | {% set minrank = minrank + 20 %}
7 | {% if minrank < 80 %}{% set minrank = 80 %}{% endif %}
8 |
9 |
10 | {% for t in ranges %}
11 |
12 | {% set thisrange = t.range %}
13 |
14 | {{ thisrange.desc() }}
15 |
16 | {{ links.link_rank(filterkeys,specialkeys,thisrange,rank=t.rank) }}
17 |
18 |
19 | {% set prct = ((minrank+1-t.rank)*100/minrank if t.rank is not none else 0) %}
20 | {{ links.link_rank(filterkeys,specialkeys,thisrange,percent=prct,rank=t.rank) }}
21 |
22 |
23 |
24 |
25 |
26 | {% endfor %}
27 |
28 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/pulse.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 | {% set ranges = dbc.get_pulse(filterkeys,limitkeys,delimitkeys) %}
4 |
5 | {% set maxbar = ranges|map(attribute="scrobbles")|max|default(1) %}
6 | {% if maxbar < 1 %}{% set maxbar = 1 %}{% endif %}
7 |
8 |
9 | {% for t in ranges %}
10 |
11 | {% set thisrange = t.range %}
12 |
13 | {{ thisrange.desc() }}
14 |
15 | {{ links.link_scrobbles([filterkeys,{'timerange':thisrange}],amount=t.scrobbles) }}
16 |
17 |
18 | {% if 'artist' in filterkeys and filterkeys.get('associated') %}
19 | {{ links.link_scrobbles([{'artist':filterkeys.artist,'associated':False,'timerange':thisrange}],percent=t.real_scrobbles*100/maxbar) }}
20 | {%- if t.real_scrobbles != t.scrobbles -%}
21 | {{ links.link_scrobbles([{'artist':filterkeys.artist,'associated':True,'timerange':thisrange}],percent=(t.scrobbles-t.real_scrobbles)*100/maxbar) }}
22 | {%- endif %}
23 | {% else %}
24 | {{ links.link_scrobbles([filterkeys,{'timerange':thisrange}],percent=t.scrobbles*100/maxbar) }}
25 | {% endif %}
26 |
27 |
28 | {% endfor %}
29 |
30 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/scrobbles.jinja:
--------------------------------------------------------------------------------
1 | {% set scrobbles = dbc.get_scrobbles(filterkeys,limitkeys,amountkeys) %}
2 |
3 | {% set firstindex = amountkeys.page * amountkeys.perpage %}
4 | {% set lastindex = firstindex + amountkeys.perpage %}
5 |
6 | {% import 'snippets/entityrow.jinja' as entityrow %}
7 |
8 |
9 |
10 | {% for s in scrobbles -%}
11 |
12 | {{ malojatime.timestamp_desc(s["time"],short=shortTimeDesc) }}
13 | {{ entityrow.row(s.track) }}
14 | {% if adminmode %}
15 |
16 |
17 |
18 |
19 | Reparse
20 | Cancel
21 |
22 |
23 |
24 | {% include 'icons/reparse.jinja' %}
25 |
26 |
27 |
28 |
29 |
30 |
31 | Delete
32 | Cancel
33 |
34 |
35 |
36 | {% include 'icons/delete.jinja' %}
37 |
38 |
39 |
40 |
41 | {% endif %}
42 |
43 | {% endfor %}
44 |
45 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/top_albums.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 | {% import 'snippets/entityrow.jinja' as entityrow %}
3 |
4 | {% set ranges = dbc.get_top_albums(filterkeys,limitkeys,delimitkeys) %}
5 |
6 | {% set maxbar = ranges|map(attribute="scrobbles")|max|default(1) %}
7 | {% if maxbar < 1 %}{% set maxbar = 1 %}{% endif %}
8 |
9 |
10 | {% for e in ranges %}
11 |
12 | {% set thisrange = e.range %}
13 | {% set album = e.album %}
14 |
15 | {{ thisrange.desc() }}
16 |
17 | {% if album is none %}
18 |
19 | n/a
20 | 0
21 |
22 | {% else %}
23 | {{ entityrow.row(album) }}
24 | {{ links.link_scrobbles([{'album':album,'timerange':thisrange}],amount=e.scrobbles) }}
25 | {{ links.link_scrobbles([{'album':album,'timerange':thisrange}],percent=e.scrobbles*100/maxbar) }}
26 | {% endif %}
27 |
28 |
29 | {% endfor %}
30 |
31 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/top_artists.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 | {% import 'snippets/entityrow.jinja' as entityrow %}
3 |
4 | {% set ranges = dbc.get_top_artists(limitkeys,delimitkeys,specialkeys) %}
5 |
6 | {% set maxbar = ranges|map(attribute="scrobbles")|max|default(1) %}
7 | {% if maxbar < 1 %}{% set maxbar = 1 %}{% endif %}
8 |
9 |
10 | {% for e in ranges %}
11 |
12 | {% set thisrange = e.range %}
13 | {% set artist = e.artist %}
14 |
15 | {{ thisrange.desc() }}
16 |
17 | {% if artist is none %}
18 |
19 | n/a
20 | 0
21 |
22 | {% else %}
23 | {{ entityrow.row(artist,counting=([] if specialkeys.separate else e.associated_artists)) }}
24 | {{ links.link_scrobbles([{'artist':artist,'associated':(not specialkeys.separate),'timerange':thisrange}],amount=e.scrobbles) }}
25 |
26 | {{ links.link_scrobbles([{'artist':e['artist'],'associated':False,'timerange':e.range}],percent=e['real_scrobbles']*100/maxbar) }}
27 | {%- if e['real_scrobbles'] != e['scrobbles'] -%}
28 | {{ links.link_scrobbles([{'artist':e['artist'],'associated':True,'timerange':e.range}],percent=(e['scrobbles']-e['real_scrobbles'])*100/maxbar) }}
29 | {%- endif %}
30 |
31 | {% endif %}
32 |
33 |
34 | {% endfor %}
35 |
36 |
--------------------------------------------------------------------------------
/maloja/web/jinja/partials/top_tracks.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 | {% import 'snippets/entityrow.jinja' as entityrow %}
3 |
4 | {% set ranges = dbc.get_top_tracks(filterkeys,limitkeys,delimitkeys) %}
5 |
6 | {% set maxbar = ranges|map(attribute="scrobbles")|max|default(1) %}
7 | {% if maxbar < 1 %}{% set maxbar = 1 %}{% endif %}
8 |
9 |
10 | {% for e in ranges %}
11 |
12 | {% set thisrange = e.range %}
13 | {% set track = e.track %}
14 |
15 | {{ thisrange.desc() }}
16 |
17 | {% if track is none %}
18 |
19 | n/a
20 | 0
21 |
22 | {% else %}
23 | {{ entityrow.row(track) }}
24 | {{ links.link_scrobbles([{'track':track,'timerange':thisrange}],amount=e.scrobbles) }}
25 | {{ links.link_scrobbles([{'track':track,'timerange':thisrange}],percent=e.scrobbles*100/maxbar) }}
26 | {% endif %}
27 |
28 |
29 | {% endfor %}
30 |
31 |
--------------------------------------------------------------------------------
/maloja/web/jinja/performance.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - {{ malojatime.delimit_desc_p(delimitkeys) }} Performance{% endblock %}
3 |
4 | {% import 'snippets/filterdescription.jinja' as filterdesc %}
5 |
6 | {% if filterkeys.get('track') is not none %}
7 | {% set img = images.get_track_image(filterkeys.track) %}
8 | {% elif filterkeys.get('artist') is not none %}
9 | {% set img = images.get_artist_image(filterkeys.artist) %}
10 | {% else %}
11 | {% set img = "/favicon.png" %}
12 | {% endif %}
13 |
14 | {% block content %}
15 |
16 |
17 |
18 |
19 |
20 |
21 | {{ malojatime.delimit_desc_p(delimitkeys) }} Performance
22 | {% if limitkeys != {} %}
23 | View Pulse
24 | {% endif %}
25 |
26 | {{ filterdesc.desc(filterkeys,limitkeys,prefix='of') }}
27 |
28 | {% with artistchart = (filterkeys.get('artist') is not none) %}
29 | {% include 'snippets/timeselection.jinja' %}
30 | {% endwith %}
31 |
32 |
33 |
34 |
35 |
36 |
37 | {% include 'partials/performance.jinja' %}
38 |
39 | {% endblock %}
40 |
--------------------------------------------------------------------------------
/maloja/web/jinja/pulse.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - {{ malojatime.delimit_desc_p(delimitkeys) }} Pulse{% endblock %}
3 |
4 | {% import 'snippets/filterdescription.jinja' as filterdesc %}
5 |
6 | {% if filterkeys.get('track') is not none %}
7 | {% set img = images.get_track_image(filterkeys.track) %}
8 | {% elif filterkeys.get('artist') is not none %}
9 | {% set img = images.get_artist_image(filterkeys.artist) %}
10 | {% else %}
11 | {% set img = "/favicon.png" %}
12 | {% endif %}
13 |
14 | {% block content %}
15 |
16 |
17 |
18 |
19 |
20 |
21 | {{ malojatime.delimit_desc_p(delimitkeys) }} Pulse
22 | {% if filterkeys != {} %}
23 | View Rankings
24 | {% endif %}
25 |
26 | {{ filterdesc.desc(filterkeys,limitkeys,prefix='of') }}
27 |
28 | {% include 'snippets/timeselection.jinja' %}
29 |
30 |
31 |
32 |
33 |
34 |
35 | {% include 'partials/pulse.jinja' %}
36 |
37 | {% endblock %}
38 |
--------------------------------------------------------------------------------
/maloja/web/jinja/scrobbles.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - Scrobbles{% endblock %}
3 |
4 | {% import 'snippets/filterdescription.jinja' as filterdesc %}
5 | {% import 'snippets/pagination.jinja' as pagination %}
6 |
7 | {% set totalscrobbles = dbc.get_scrobbles_num(filterkeys,limitkeys) %}
8 | {% set scrobbles = dbc.get_scrobbles(filterkeys,limitkeys,amountkeys) %}
9 | {% set pages = math.ceil(totalscrobbles / amountkeys.perpage) %}
10 |
11 | {% if filterkeys.get('track') is not none %}
12 | {% set img = images.get_track_image(filterkeys.track) %}
13 | {% elif filterkeys.get('artist') is not none %}
14 | {% set img = images.get_artist_image(filterkeys.artist) %}
15 | {% elif scrobbles.__len__() > 0 %}
16 | {% set img = images.get_track_image(scrobbles[0].track) %}
17 | {% else %}
18 | {% set img = "/favicon.png" %}
19 | {% endif %}
20 |
21 | {% block content %}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | Scrobbles
31 | {{ filterdesc.desc(filterkeys,limitkeys) }}
32 |
33 | {{ totalscrobbles }} Scrobbles
34 |
35 | {% with delimitkeys = {} %}
36 | {% include 'snippets/timeselection.jinja' %}
37 | {% endwith %}
38 |
39 |
40 |
41 |
42 |
43 |
44 | {% include 'partials/scrobbles.jinja' %}
45 |
46 | {{ pagination.pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages) }}
47 |
48 |
49 | {% endblock %}
50 |
--------------------------------------------------------------------------------
/maloja/web/jinja/snippets/entityrow.jinja:
--------------------------------------------------------------------------------
1 | {% macro row(entity,counting=[],adminmode=False) %}
2 |
3 | {% import 'snippets/links.jinja' as links %}
4 |
5 | {% if entity is mapping and 'title' in entity %}
6 | {% set img = images.get_track_image(entity) %}
7 | {% elif entity is mapping and 'albumtitle' in entity %}
8 | {% set img = images.get_album_image(entity) %}
9 | {% else %}
10 | {% set img = images.get_artist_image(entity) %}
11 | {% endif %}
12 |
13 |
14 | {% if settings['DISPLAY_ART_ICONS'] %}
15 |
16 | {% endif %}
17 |
18 | {% if entity is mapping and 'title' in entity %}
19 | {% if settings['TRACK_SEARCH_PROVIDER'] %}
20 | {{ links.link_search(entity) }}
21 | {% endif %}
22 |
23 | {{ links.links(entity.artists, restrict_amount=True) }} – {{ links.link(entity) }}
24 |
25 | {% elif entity is mapping and 'albumtitle' in entity %}
26 |
27 | {{ links.links(entity.artists, restrict_amount=True) }} – {{ links.link(entity) }}
28 |
29 | {% else %}
30 | {{ links.link(entity) }}
31 | {% if counting != [] %}
32 |
33 | {% endif %}
34 |
35 |
36 | {% endif %}
37 |
38 |
39 | {% if adminmode %}
40 |
41 | {% include 'icons/merge_mark.jinja' %}
42 | {% include 'icons/merge_unmark.jinja' %}
43 | {% if (entity is mapping) %}
44 | {% include 'icons/association_mark.jinja' %}
45 | {% include 'icons/association_unmark.jinja' %}
46 | {% endif %}
47 |
48 | {% endif %}
49 |
50 | {% endmacro %}
51 |
--------------------------------------------------------------------------------
/maloja/web/jinja/snippets/filterdescription.jinja:
--------------------------------------------------------------------------------
1 | {% import 'snippets/links.jinja' as links %}
2 |
3 | {% macro desc(filterkeys,limitkeys,prefix="by") %}
4 |
5 | {% if filterkeys.get('artist') is not none %}
6 | {{ prefix }} {{ links.link(filterkeys.get('artist')) }}{% if filterkeys.get('associated') %} (and associated artists){% endif %}
7 | {% elif filterkeys.get('track') is not none %}
8 | of {{ links.link(filterkeys.get('track')) }}
9 | by {{ links.links(filterkeys["track"]["artists"]) }}
10 | {% elif filterkeys.get('album') is not none %}
11 | from {{ links.link(filterkeys.get('album')) }}
12 | by {{ links.links(filterkeys["album"]["artists"]) }}
13 | {% endif %}
14 | {{ limitkeys.timerange.desc(prefix=True) }}
15 |
16 | {% endmacro %}
17 |
--------------------------------------------------------------------------------
/maloja/web/jinja/snippets/pagination.jinja:
--------------------------------------------------------------------------------
1 | {% macro pagination(filterkeys,limitkeys,delimitkeys,amountkeys,pages=1) %}
2 |
3 | {% set page = amountkeys.page %}
4 |
5 |
6 |
7 |
8 |
9 |
10 | {% if pages > 1 %}
11 | {% if page > 1 %}
12 |
13 | 1 |
14 | {% endif %}
15 |
16 | {% if page > 2 %}
17 | ... |
18 | {% endif %}
19 |
20 | {% if page > 0 %}
21 |
22 | {{ page }} «
23 | {% endif %}
24 |
25 |
26 | {{ page + 1 }}
27 |
28 |
29 | {% if page < pages-1 %}
30 | »
31 | {{ page+2 }}
32 | {% endif %}
33 |
34 | {% if page < pages-3 %}
35 | | ...
36 | {% endif %}
37 |
38 | {% if page < pages-2 %}
39 | |
40 | {{ pages }}
41 | {% endif %}
42 | {% endif %}
43 |
44 |
45 |
46 | {% endmacro %}
47 |
--------------------------------------------------------------------------------
/maloja/web/jinja/start.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja{% endblock %}
3 |
4 | {% block scripts %}
5 |
6 |
7 |
8 |
9 | {% endblock %}
10 |
11 | {% block content -%}
12 |
13 |
14 |
15 |
16 | {% for module in ['charts_artists','charts_tracks','charts_albums','pulse','lastscrobbles'] %}
17 |
18 |
19 |
20 | {% include 'startpage_modules/' + module + '.jinja' %}
21 |
22 |
23 |
24 |
25 | {% endfor %}
26 |
27 |
28 |
29 |
30 | {%- endblock %}
31 |
--------------------------------------------------------------------------------
/maloja/web/jinja/startpage_modules/charts_albums.jinja:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% for r in xcurrent -%}
4 |
5 | {{ r.localisation }}
6 |
7 | {{ "|" if not loop.last }}
8 | {%- endfor %}
9 |
10 |
11 |
12 |
13 | {% for r in xcurrent -%}
14 |
15 | {%- with limitkeys = {"timerange":r.range} -%}
16 | {% include 'partials/charts_albums_tiles.jinja' %}
17 | {%- endwith -%}
18 |
19 | {%- endfor %}
20 |
--------------------------------------------------------------------------------
/maloja/web/jinja/startpage_modules/charts_artists.jinja:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% for r in xcurrent -%}
4 |
5 | {{ r.localisation }}
6 |
7 | {{ "|" if not loop.last }}
8 | {%- endfor %}
9 |
10 |
11 |
12 |
13 | {% for r in xcurrent -%}
14 |
15 | {%- with limitkeys = {"timerange":r.range} -%}
16 | {% include 'partials/charts_artists_tiles.jinja' %}
17 | {%- endwith -%}
18 |
19 | {%- endfor %}
20 |
--------------------------------------------------------------------------------
/maloja/web/jinja/startpage_modules/charts_tracks.jinja:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% for r in xcurrent -%}
4 |
5 | {{ r.localisation }}
6 |
7 | {{ "|" if not loop.last }}
8 | {%- endfor %}
9 |
10 |
11 |
12 |
13 | {% for r in xcurrent -%}
14 |
15 | {%- with limitkeys = {"timerange":r.range} -%}
16 | {% include 'partials/charts_tracks_tiles.jinja' %}
17 | {%- endwith -%}
18 |
19 | {%- endfor %}
20 |
--------------------------------------------------------------------------------
/maloja/web/jinja/startpage_modules/featured.jinja:
--------------------------------------------------------------------------------
1 |
2 |
3 | Featured
4 |
5 | {% set featured = dbc.get_featured() %}
6 |
7 | {% set entitytypes = [
8 | {'identifier':'artist','localisation':"Artist", 'template':"info_artist.jinja", 'filterkeys':{"artist": featured.artist } },
9 | {'identifier':'track','localisation':"Track", 'template':"info_track.jinja", 'filterkeys':{"track": featured.track } },
10 | {'identifier':'album','localisation':"Album", 'template':"info_album.jinja", 'filterkeys':{"album": featured.album } }
11 | ] %}
12 |
13 |
14 | {% for t in entitytypes -%}
15 |
16 | {{ t.localisation }}
17 |
18 | {{ "|" if not loop.last }}
19 | {%- endfor %}
20 |
21 |
22 |
23 |
24 | {% for t in entitytypes -%}
25 |
26 | {%- with filterkeys = t.filterkeys -%}
27 | {%- with condensed = true -%}
28 | {% if filterkeys[t.identifier] %}
29 | {% include 'partials/' + t.template %}
30 | {% endif %}
31 | {%- endwith -%}
32 | {%- endwith -%}
33 |
34 | {%- endfor %}
35 |
36 |
37 |
38 |
39 |
66 |
--------------------------------------------------------------------------------
/maloja/web/jinja/startpage_modules/lastscrobbles.jinja:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% for range in xcurrent %}
4 | {{ range.localisation }}
5 | {{ dbc.get_scrobbles_num({'timerange':range.range}) }}
6 | {% endfor %}
7 |
8 |
9 |
10 |
11 |
12 | {%- with amountkeys = {"perpage":12,"page":0}, shortTimeDesc=True -%}
13 | {% include 'partials/scrobbles.jinja' %}
14 | {%- endwith -%}
15 |
16 |
--------------------------------------------------------------------------------
/maloja/web/jinja/startpage_modules/pulse.jinja:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% for range in xranges -%}
4 |
5 | {{ range.localisation }}
6 |
7 | {{ "|" if not loop.last }}
8 | {%- endfor %}
9 |
10 |
11 | {% for range in xranges -%}
12 |
13 | {%- with limitkeys={"since":range.firstrange},delimitkeys={"step":range.identifier} -%}
14 | {% include 'partials/pulse.jinja' %}
15 | {%- endwith -%}
16 |
17 | {%- endfor %}
18 |
--------------------------------------------------------------------------------
/maloja/web/jinja/top_albums.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - #1 Albums{% endblock %}
3 |
4 | {% import 'snippets/filterdescription.jinja' as filterdesc %}
5 |
6 |
7 |
8 | {% set entries = dbc.get_top_albums(filterkeys,limitkeys,delimitkeys) %}
9 | {% set repr = entries | find_representative('album','scrobbles') %}
10 | {% set img = "/favicon.png" if repr is none else images.get_album_image(repr.album) %}
11 |
12 |
13 | {% block content %}
14 |
15 |
16 |
17 |
18 |
19 |
20 | #1 Albums
21 | {{ filterdesc.desc(filterkeys,limitkeys) }}
22 |
23 |
24 | {% include 'snippets/timeselection.jinja' %}
25 |
26 |
27 |
28 |
29 | {% include 'partials/top_albums.jinja' %}
30 |
31 | {% endblock %}
32 |
--------------------------------------------------------------------------------
/maloja/web/jinja/top_artists.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - #1 Artists{% endblock %}
3 |
4 | {% import 'snippets/filterdescription.jinja' as filterdesc %}
5 |
6 |
7 |
8 | {% set entries = dbc.get_top_artists(limitkeys,delimitkeys) %}
9 | {% set repr = entries | find_representative('artist','scrobbles') %}
10 | {% set img = "/favicon.png" if repr is none else images.get_artist_image(repr.artist) %}
11 |
12 |
13 | {% block content %}
14 |
15 |
16 |
17 |
18 |
19 |
20 | #1 Artists
21 | {{ filterdesc.desc(filterkeys,limitkeys) }}
22 |
23 |
24 | {% with artistchart = True %}
25 | {% include 'snippets/timeselection.jinja' %}
26 | {% endwith %}
27 |
28 |
29 |
30 |
31 |
32 | {% include 'partials/top_artists.jinja' %}
33 |
34 | {% endblock %}
35 |
--------------------------------------------------------------------------------
/maloja/web/jinja/top_tracks.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - #1 Tracks{% endblock %}
3 |
4 | {% import 'snippets/filterdescription.jinja' as filterdesc %}
5 |
6 |
7 |
8 | {% set entries = dbc.get_top_tracks(filterkeys,limitkeys,delimitkeys) %}
9 | {% set repr = entries | find_representative('track','scrobbles') %}
10 | {% set img = "/favicon.png" if repr is none else images.get_track_image(repr.track) %}
11 |
12 |
13 | {% block content %}
14 |
15 |
16 |
17 |
18 |
19 |
20 | #1 Tracks
21 | {{ filterdesc.desc(filterkeys,limitkeys) }}
22 |
23 |
24 | {% include 'snippets/timeselection.jinja' %}
25 |
26 |
27 |
28 |
29 | {% include 'partials/top_tracks.jinja' %}
30 |
31 | {% endblock %}
32 |
--------------------------------------------------------------------------------
/maloja/web/jinja/wait.jinja:
--------------------------------------------------------------------------------
1 | {% extends "abstracts/base.jinja" %}
2 | {% block title %}Maloja - Please wait...{% endblock %}
3 |
4 | {% block heading %}Rebuilding the database{% endblock %}
5 |
6 | {% block top_info %}
7 | Please wait...
8 | {% endblock %}
9 |
10 | {% block scripts %}
11 |
42 | {% endblock %}
43 |
--------------------------------------------------------------------------------
/maloja/web/static/css/grisonsfont.css:
--------------------------------------------------------------------------------
1 |
2 | @font-face {
3 | font-family: 'Ubuntu';
4 | font-style: normal;
5 | font-weight: 400;
6 | src: local('Ubuntu Regular'), local('Ubuntu-Regular'), url('/static/ttf/Ubuntu-Regular.ttf') format('woff2');
7 | }
8 |
--------------------------------------------------------------------------------
/maloja/web/static/css/startpage.css:
--------------------------------------------------------------------------------
1 | div#startpage {
2 | display: grid;
3 | justify-content: center;
4 |
5 | display: fixed;
6 | grid-column-gap: 25px;
7 | grid-row-gap: 25px;
8 | }
9 |
10 |
11 | @media (min-width: 2201px) {
12 | div#startpage {
13 | grid-template-columns: repeat(6, 14vw);
14 | grid-template-rows: repeat(2, 45vh);
15 | grid-column-gap: 2vw;
16 |
17 | grid-template-areas:
18 | "charts_artists charts_artists charts_tracks charts_tracks charts_albums charts_albums"
19 | "empty1 lastscrobbles lastscrobbles pulse pulse empty2";
20 | }
21 | }
22 |
23 | @media (min-width: 1401px) and (max-width: 2200px) {
24 | div#startpage {
25 | grid-template-columns: repeat(2, 45vw);
26 | grid-template-rows: repeat(3, 45vh);
27 |
28 | grid-template-areas:
29 | "charts_artists lastscrobbles"
30 | "charts_tracks pulse"
31 | "charts_albums empty";
32 | }
33 | }
34 |
35 | @media (max-width: 1400px) {
36 | div#startpage {
37 | grid-template-columns: 90vw;
38 |
39 | grid-template-areas:
40 | "charts_artists"
41 | "charts_tracks"
42 | "charts_albums"
43 | "lastscrobbles"
44 | "pulse";
45 | }
46 |
47 | #start_page_module_featured {
48 | display: none;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/maloja/web/static/css/themes/constantinople.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --base-color: #140c12;
3 | --base-color-dark: #080507;
4 | --base-color-light: #2c1b28;
5 | --base-color-accent: #452a3e;
6 | --base-color-accent-dark: #442b3e;
7 | --base-color-accent-light: #dfcad9;
8 |
9 | --text-color: #d8b700;
10 | --text-color-selected: fadeout(var(--text-color),40%);
11 | --text-color-secondary: #6a7600;
12 | --text-color-tertiary: #474f00;
13 | --text-color-focus: #3D428B;
14 |
15 | --ctrl-element-color-bg: rgba(0,255,255,0.1);
16 | --ctrl-element-color-main: rgba(103,85,0,0.7);
17 | --ctrl-element-color-focus: gold;
18 |
19 | --button-color-bg: var(--text-color);
20 | --button-color-bg-focus: var(--text-color-focus);
21 | --button-color-fg: var(--base-color);
22 | --button-color-fg-focus: var(--base-color);
23 | }
24 |
--------------------------------------------------------------------------------
/maloja/web/static/css/themes/kda.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --base-color: #2f3493;
3 | --base-color-dark: #000000;
4 | --base-color-light: #59ebfc;
5 | --base-color-accent: #9821a5;
6 | --base-color-accent-dark: #740C7F;
7 | --base-color-accent-light: #D41BE8;
8 |
9 | --text-color: #e5b48f;
10 | --text-color-selected: fadeout(var(--text-color),40%);
11 | --text-color-secondary: #f9f9f9;
12 | --text-color-tertiary: #f7f7f7;
13 | --text-color-focus: #59ebfc;
14 |
15 | --ctrl-element-color-bg: rgba(0,255,255,0.1);
16 | --ctrl-element-color-main: rgba(103,85,0,0.7);
17 | --ctrl-element-color-focus: gold;
18 |
19 | --button-color-bg: var(--text-color);
20 | --button-color-bg-focus: var(--text-color-focus);
21 | --button-color-fg: var(--base-color);
22 | --button-color-fg-focus: var(--base-color);
23 | }
24 |
--------------------------------------------------------------------------------
/maloja/web/static/css/themes/maloja.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/css/themes/maloja.css
--------------------------------------------------------------------------------
/maloja/web/static/ico/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ico/favicon.ico
--------------------------------------------------------------------------------
/maloja/web/static/ico/favicon_old.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ico/favicon_old.ico
--------------------------------------------------------------------------------
/maloja/web/static/js/datechange.js:
--------------------------------------------------------------------------------
1 | function datechange() {
2 |
3 | since = document.getElementById("dateselect_from").value;
4 | to = document.getElementById("dateselect_to").value;
5 |
6 | since = since.split("-").join("/")
7 | to = to.split("-").join("/")
8 |
9 | //url = window.location.href
10 | //var url = document.createElement("a")
11 | //url.href = window.location.href
12 | //console.log(url.search)
13 |
14 | keys = window.location.search.substring(1).split("&")
15 |
16 |
17 | var keydict = {};
18 | for (var i=0;i `
11 |
12 | ${info.title}
13 | ${info.body}
14 |
15 |
16 | `
17 |
18 | function htmlToElement(html) {
19 | template = document.createElement('template');
20 | html = html.trim();
21 | template.innerHTML = html;
22 | return template.content.firstChild;
23 | }
24 |
25 | function notify(title,msg,notification_type='info',reload=false) {
26 | info = {
27 | 'title':title,
28 | 'body':msg,
29 | 'notification_type':notification_type
30 | }
31 |
32 | var element = htmlToElement(notification_template(info));
33 |
34 | document.getElementById('notification_area').append(element);
35 |
36 | setTimeout(function(e){e.remove();},7000,element);
37 | }
38 |
39 | function notifyCallback(request) {
40 | var response = request.response;
41 | var status = request.status;
42 |
43 | if (status == 200) {
44 | if (response.hasOwnProperty('warnings') && response.warnings.length > 0) {
45 | var notification_type = 'warning';
46 | }
47 | else {
48 | var notification_type = 'info';
49 | }
50 |
51 | var title = "Success!";
52 | var msg = response.desc || response;
53 | }
54 | else {
55 | var notification_type = 'error';
56 | var title = "Error: " + response.error.type;
57 | var msg = response.error.desc || "";
58 | }
59 |
60 |
61 | notify(title,msg,notification_type);
62 | }
63 |
--------------------------------------------------------------------------------
/maloja/web/static/js/statselect.js:
--------------------------------------------------------------------------------
1 | localStorage = window.localStorage;
2 |
3 | function showStats(identifier,unit) {
4 | // Make all modules disappear
5 | var modules = document.getElementsByClassName("stat_module_" + identifier);
6 | for (var i=0;i
2 |
--------------------------------------------------------------------------------
/maloja/web/static/svg/placeholder_artist.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/maloja/web/static/svg/placeholder_track.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/maloja/web/static/ttf/Ubuntu-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ttf/Ubuntu-Bold.ttf
--------------------------------------------------------------------------------
/maloja/web/static/ttf/Ubuntu-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ttf/Ubuntu-BoldItalic.ttf
--------------------------------------------------------------------------------
/maloja/web/static/ttf/Ubuntu-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ttf/Ubuntu-Italic.ttf
--------------------------------------------------------------------------------
/maloja/web/static/ttf/Ubuntu-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ttf/Ubuntu-Light.ttf
--------------------------------------------------------------------------------
/maloja/web/static/ttf/Ubuntu-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ttf/Ubuntu-LightItalic.ttf
--------------------------------------------------------------------------------
/maloja/web/static/ttf/Ubuntu-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ttf/Ubuntu-Medium.ttf
--------------------------------------------------------------------------------
/maloja/web/static/ttf/Ubuntu-MediumItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ttf/Ubuntu-MediumItalic.ttf
--------------------------------------------------------------------------------
/maloja/web/static/ttf/Ubuntu-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/maloja/web/static/ttf/Ubuntu-Regular.ttf
--------------------------------------------------------------------------------
/maloja/web/static/txt/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /
3 |
--------------------------------------------------------------------------------
/pylintrc:
--------------------------------------------------------------------------------
1 | # no linting is currently enforced, this is just for reference
2 | [MASTER]
3 | disable=C0114,C0115,C0116, # docstrings
4 | W0703, # broad exception catching
5 | W1514, # open without encoding
6 |
7 | [VARIABLES]
8 | allow-global-unused-variables=no
9 |
10 | [BASIC]
11 | argument-naming-style=snake_case
12 | attr-naming-style=snake_case
13 | class-naming-style=PascalCase
14 | const-naming-style=UPPER_CASE
15 | function-naming-style=snake_case
16 | variable-naming-style=snake_case
17 | indent-string='\t'
18 | good-names=i,j,k, # loops
19 | x,y, # dimensions
20 | e # exceptions
21 |
22 | max-line-length=200
23 | max-module-lines=1000
24 |
25 | [DESIGN]
26 |
27 | max-args=8
28 | max-attributes=7
29 | max-bool-expr=5
30 | max-branches=12
31 | max-locals=15
32 | max-parents=7
33 | max-public-methods=20
34 | max-returns=6
35 | max-statements=50
36 | min-public-methods=2
37 |
38 | [EXCEPTIONS]
39 |
40 | overgeneral-exceptions=BaseException,
41 | Exception
42 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "malojaserver"
3 | version = "3.2.4"
4 | description = "Self-hosted music scrobble database"
5 | readme = "README.md"
6 | requires-python = "==3.12.*"
7 | license = { file="LICENSE" }
8 | authors = [ { name="Johannes Krattenmacher", email="maloja@dev.krateng.ch" } ]
9 |
10 | urls.repository = "https://github.com/krateng/maloja"
11 | urls.documentation = "https://github.com/krateng/maloja"
12 | urls.homepage = "https://github.com/krateng/maloja"
13 |
14 | keywords = ["scrobbling", "music", "selfhosted", "database", "charts", "statistics"]
15 | classifiers = [
16 | "Programming Language :: Python :: 3",
17 | "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
18 | "Operating System :: OS Independent"
19 | ]
20 |
21 | dependencies = [
22 | "bottle==0.13.*",
23 | "waitress==3.0.*",
24 | "doreah==2.0.*",
25 | "nimrodel==0.8.*",
26 | "setproctitle==1.3.*",
27 | "jinja2==3.1.*",
28 | "lru-dict==1.3.*",
29 | "psutil==5.9.*",
30 | "sqlalchemy==2.0",
31 | "python-datauri==3.0.*",
32 | "python-magic==0.4.*",
33 | "requests==2.32.*",
34 | "toml==0.10.*",
35 | "PyYAML==6.0.*"
36 | ]
37 |
38 | [project.optional-dependencies]
39 | full = [
40 | "pyvips==2.2.*"
41 | ]
42 |
43 | [project.scripts]
44 | maloja = "maloja.__main__:main"
45 |
46 | [build-system]
47 | requires = ["flit_core >=3.10,<4"]
48 | build-backend = "flit_core.buildapi"
49 |
50 | [tool.flit.module]
51 | name = "maloja"
52 |
53 | [tool.osreqs.alpine]
54 | build =[
55 | "gcc",
56 | "g++",
57 | "python3-dev",
58 | "libxml2-dev",
59 | "libxslt-dev",
60 | "libffi-dev",
61 | "libc-dev",
62 | "py3-pip",
63 | "linux-headers"
64 | ]
65 | run = [
66 | "python3",
67 | "py3-lxml",
68 | "tzdata",
69 | "libmagic"
70 | ]
71 | opt = [
72 | "vips"
73 | ]
74 |
75 | [tool.osreqs.debian]
76 | build = [
77 | "python3-pip"
78 | ]
79 | run = [
80 | "python3"
81 | ]
82 | opt = []
83 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | bottle==0.13.*
2 | waitress==3.0.*
3 | doreah==2.0.*
4 | nimrodel==0.8.*
5 | setproctitle==1.3.*
6 | jinja2==3.1.*
7 | lru-dict==1.3.*
8 | psutil==5.9.*
9 | sqlalchemy==2.0
10 | python-datauri==3.0.*
11 | python-magic==0.4.*
12 | requests==2.32.*
13 | toml==0.10.*
14 | PyYAML==6.0.*
15 |
16 |
--------------------------------------------------------------------------------
/requirements_extra.txt:
--------------------------------------------------------------------------------
1 | pyvips==2.2.*
2 |
3 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krateng/maloja/9e44cc3ce6d4259c32026ba50ee934e024b43a7a/screenshot.png
--------------------------------------------------------------------------------