diff --git a/maloja/__init__.py b/maloja/__init__.py index 758a375..3f393c1 100644 --- a/maloja/__init__.py +++ b/maloja/__init__.py @@ -25,8 +25,7 @@ resources = [ "web/*", "static/*/*", "data_files/*/*", - "data_files/*/*/*", - "data_files/.doreah" + "data_files/*/*/*" ] commands = { diff --git a/maloja/web/artist.pyhp b/maloja/web/artist.pyhp index 422c0aa..cab590b 100644 --- a/maloja/web/artist.pyhp +++ b/maloja/web/artist.pyhp @@ -112,9 +112,9 @@ - - - + + + @@ -133,9 +133,7 @@ - - - + diff --git a/maloja/web/charts_artists.pyhp b/maloja/web/charts_artists.pyhp index b79355e..4e85d87 100644 --- a/maloja/web/charts_artists.pyhp +++ b/maloja/web/charts_artists.pyhp @@ -36,7 +36,9 @@ - + + + diff --git a/maloja/web/charts_tracks.pyhp b/maloja/web/charts_tracks.pyhp new file mode 100644 index 0000000..84715a8 --- /dev/null +++ b/maloja/web/charts_tracks.pyhp @@ -0,0 +1,47 @@ + + + + + + Maloja - Track Charts + + + + + + + # this is temporary! all modules need to be converted into partials at some point + html_charts, rep = htmlmodules.module_trackcharts(**amountkeys,**limitkeys) + + + + + + + + +
+
+
+

Track Charts

View #1 Tracks
+ + by + + +

+ + +
+ + + + + + + + + + + + + diff --git a/maloja/web/partial/charts_artists.pyhp b/maloja/web/partial/charts_artists.pyhp index 7bb9582..5e02895 100644 --- a/maloja/web/partial/charts_artists.pyhp +++ b/maloja/web/partial/charts_artists.pyhp @@ -63,8 +63,8 @@ else: - - + + diff --git a/maloja/web/partial/charts_tracks.pyhp b/maloja/web/partial/charts_tracks.pyhp new file mode 100644 index 0000000..39c3232 --- /dev/null +++ b/maloja/web/partial/charts_tracks.pyhp @@ -0,0 +1,70 @@ + + + if amountkeys.get("max_") is not None: amountkeys["perpage"],amountkeys["page"] = amountkeys["max_"],0 + firstindex = amountkeys["page"] * amountkeys["perpage"] + lastindex = firstindex + amountkeys["perpage"] + + + + + + + + + + try: + trackslast = db.get_charts_tracks(**kwargs_filter,timerange=kwargs_time["timerange"].next(step=-1)) + # create rank association + lastrank = {} + for tl in trackslast: + lastrank[(*tl["track"]["artists"],tl["track"]["title"])] = tl["rank"] + for t in tracks: + try: + t["delta"] = lastrank[(*t["track"]["artists"],t["track"]["title"])] - t["rank"] + except: + t["delta"] = math.inf + except: + pass + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#🆕↗↘➡
+ + + + + diff --git a/maloja/web/partial/link_track_scrobbles.pyhp b/maloja/web/partial/link_track_scrobbles.pyhp new file mode 100644 index 0000000..e990796 --- /dev/null +++ b/maloja/web/partial/link_track_scrobbles.pyhp @@ -0,0 +1,8 @@ + + + + + +
+
+
diff --git a/maloja/web/partial/pagination.pyhp b/maloja/web/partial/pagination.pyhp index 2449a98..73d581b 100644 --- a/maloja/web/partial/pagination.pyhp +++ b/maloja/web/partial/pagination.pyhp @@ -1,5 +1,4 @@ - - + @@ -8,52 +7,54 @@
- - - - 1 - - - | - + + + + + 1 + + + | + - - ... | - + + ... | + - - - - - - - « - + + + + + + + « + - - - + + + - - » - - - - - - + + » + + + + + + - - | ... - + + | ... + - - | - - - - - + + | + + + + + +
diff --git a/maloja/web/partial/pulse.pyhp b/maloja/web/partial/pulse.pyhp index 778c645..7396ea4 100644 --- a/maloja/web/partial/pulse.pyhp +++ b/maloja/web/partial/pulse.pyhp @@ -1,5 +1,5 @@ - if amountkeys["max_"] is not None: amountkeys["perpage"],amountkeys["page"] = amountkeys["max_"],0 + if amountkeys.get("max_") is not None: amountkeys["perpage"],amountkeys["page"] = amountkeys["max_"],0 firstindex = amountkeys["page"] * amountkeys["perpage"] lastindex = firstindex + amountkeys["perpage"] @@ -23,3 +23,9 @@ + + + + + + diff --git a/scrobblers/maloja-scrobbler.zip b/scrobblers/maloja-scrobbler.zip index 709e32e..c090686 100644 Binary files a/scrobblers/maloja-scrobbler.zip and b/scrobblers/maloja-scrobbler.zip differ