Browse Source

Reformats

master
parent
commit
801612763e
Signed by: Christian van Onzenoodt <christian.van-onzenoodt@uni-ulm.de> GPG Key ID: 7B2E632FDC852341
2 changed files with 7 additions and 2 deletions
  1. 1
    0
      main.py
  2. 6
    2
      trackify/server/views.py

+ 1
- 0
main.py View File

@@ -1,3 +1,4 @@
1
+#! /usr/bin/env python3
1 2
 from trackify import app, socket
2 3
 
3 4
 if __name__ == '__main__':

+ 6
- 2
trackify/server/views.py View File

@@ -26,6 +26,10 @@ class FavoriteTrackView(MethodView):
26 26
                           if r.spotify_timestamp > end and
27 27
                           r.spotify_timestamp < start)
28 28
 
29
-        top_tracks = select((r.item, count(r)) for r in requests).order_by(desc(2))
29
+        top_tracks = select((r.item, count(r))
30
+                            for r in requests).order_by(desc(2))
30 31
 
31
-        return jsonify(list(map(lambda i: {'item': i[0].to_dict(), 'plays': i[1]}, top_tracks)))
32
+        return jsonify(list(map(lambda i: {
33
+            'item': i[0].to_dict(),
34
+            'plays': i[1]
35
+        }, top_tracks)))

Loading…
Cancel
Save