Kevin Mok
89432834f6
Fix duplicate key bug, set root url to login
6 years ago
Kevin Mok
670693203e
Fix genre graph not displaying
- take top genres/artists for graphs
- improve graphs' appearance
- update pip packages
6 years ago
Kevin Mok
c4277ab0b4
Setup history log on nzxt-arch
6 years ago
Kevin Mok
4ddf11aa41
Added admin command to scan personal history ( #58 )
Reverted exported history file to exclude timestamp. Simplified logging
for scanning user history.
6 years ago
Kevin Mok
895cf7d40d
Split parse_history into own function
For grabbing history in a command (#58 ).
6 years ago
Kevin Mok
3d0acc7a4b
Refactor saving History obj
From import_history and parse_history. Also refactor getting CSV
information from import_history.
6 years ago
Kevin Mok
f54eb4a814
Refactor saving artists to track
Exact same code in parse_history, parse_library and import_history.
6 years ago
Kevin Mok
2644a3aeb2
Parse listening history and add Track objects
6 years ago
Chris Shyi
765141c024
Improve readability
Added additional comments to improve readability of the genre graph
related code.
7 years ago
Chris Shyi
54c541426c
Genre Artist Breakdown
Implemented the generation of genre artist breakdown data for the genre
graphs. More test cases needed.
7 years ago
Chris Shyi
6665532fea
Made minor fixes to docstrings
7 years ago
Chris Shyi
fc6c30ec32
Refactor audio feat graph
Fixes #51 . Instead of passing in an array of hard coded values as the
interval end points, an object specifying the beginning, the end, and
the step size is used. Categories can be more easily defined and
modified this way.
7 years ago
Kevin Mok
c949ecd3cc
Setup API app, can scan library ( #47 )
Manually merged console logging from loading-page branch.
7 years ago
Kevin Mok
e50d3d8476
Login app working ( #47 )
Can login and create User object. Also now store user token info in db
(closes #48 ).
7 years ago
Kevin Mok
8b1344d453
Split spotifyvis code into different apps ( #47 )
Server is able to start, but none of the apps are linked together yet.
7 years ago
Kevin Mok
3bcd7576cf
Improved items processed count for logging
Now keeps track of number of items processed across function calls.
7 years ago
Kevin Mok
22ea472889
Store user's total songs
Also fixed "lag" to access admin charts page.
7 years ago
Kevin Mok
8faf229df9
Added global var to toggle console logging
7 years ago
Kevin Mok
a0a1b86164
Implement getting user's entire library
By passing 0 as num_tracks to parse_library.
7 years ago
Kevin Mok
5756642521
Added complete console logging for parsing library
Specifically, when making API calls for genres/features and updating
genres for tracks in db.
7 years ago
Kevin Mok
2b98398b6c
Fixed bug in get_artists_in_genre
Artist would show up in "undefined" genre even when they don't have that
genre. Likely due to changing genre to be a model so updated code to
adjust to that.
7 years ago
Kevin Mok
3aa49cc4e1
Resolves #35
7 years ago
Kevin Mok
0c0520af8c
Added most common genre to all tracks ( closes #34 )
Resolved issue of there being multiple artists on a track and "manually
created" an undefined genre for artists that don't have a genre.
7 years ago
Kevin Mok
85c178f2b3
Resolves #39
7 years ago
Kevin Mok
3fe52343aa
Use "several" API call to get audio features
Closes #20 . Also close #38 since parse_library is a bit cleaner now with
some folds, and there's not much to be refactored any more.
7 years ago
Chris Shyi
4c55744db8
Update docstring for parse_library()
The docstring of parse_library still mentions the library_stats
dictionary, which had already been removed.
7 years ago
Kevin Mok
bd597cdc23
Use "several" API call to get artist genres
7 years ago
Kevin Mok
709ed9b491
Added most common genre for tracks with 1 artist
Still have to find shared genres for songs with multiple artists (see #34 ).
7 years ago
Kevin Mok
4e1a6df89e
Store genres in artists as m2m field ( #34 )
7 years ago
Kevin Mok
de93bd7b0a
Store counts for genres in Genre model
Have not assigned most common genre to Track models yet (currently
blank).
7 years ago
Chris Shyi
e614b373df
Fix program crash when AudioFeatures is missing
Fixes #32 . AudioFeatures object query is now wrapped in a try/except
block to account for the scenario where the object doesn't exist.
7 years ago
Chris Shyi
0714586e07
Fix program crash when AudioFeatures is missing
Fixes #32 . AudioFeatures object query is now wrapped in a try/except
block to account for the scenario where the object doesn't exist.
7 years ago
Chris Shyi
c518556126
Draw audio feature bar charts
Started work on drawing the bar charts for audio features.
7 years ago
Kevin Mok
9875cbeb68
Moved script to create genre graph to static file
- sorted artists in bar by most to least, bottom to top
- wrap x-axis labels by bar width
- increased track name length (program crashed on a track name)
7 years ago
Kevin Mok
f71ba20116
Fixed bars not being at right height
Avoided artist breakdown overflowing total tracks in genre by only
adding artists while running tally is less than total.
7 years ago
Kevin Mok
2342e6ef49
Initial setup of stacked bar chart for genres
Bunch of issues with it that still need to be fixed.
7 years ago
Kevin Mok
7b968c9d86
Include artist breakdown in get_genre_data
7 years ago
Kevin Mok
05b5cc404a
Trying to get correct artist breakdown in genres
Counts are off since there are multiple artists on a track.
7 years ago
Chris Shyi
9d43048067
Clean up views.py and utils.py further
views.py and utils.py were cleaned up further to remove any obsolete usage of
library_stats.
7 years ago
Kevin Mok
ea5990d048
Fixed duplicate key error in save_track_obj
Can't create Track object without the artists/user so get_or_create
doesn't work properly.
7 years ago
Chris Shyi
92d5d174e8
Modify maximum field length
Artist.genre and Track.name had maximum lengths that were not long enough, now increased.
7 years ago
Chris Shyi
fd7a031bf2
Fix incorrect usage of update()
update() is a QuerySet method. To update a single object, use save().
7 years ago
Chris Shyi
90dbda4336
Removed UserAudioSummary class
7 years ago
Chris Shyi
797115e9cb
Clean up utils.py to use database
Uses of the original library_stats dictionary in utils.py were either removed or commented out, replaced by the saving of models into the database.
7 years ago
Kevin Mok
79aedc655d
Trying to pass artist data from db to frontend
7 years ago
Kevin Mok
62cc6c8ccd
Setup AudioFeatures table
7 years ago
Kevin Mok
cdcc33c014
Setup Track table, modified models to data
Recreated migrations from scratch to fix bug with initializing Track
objects.
7 years ago
Kevin Mok
549af96db7
Setup Artist table
Removed printing of library_stats.
7 years ago
Chris Shyi
248e9b0ab6
Change database settings
Edited settings.py to use PostgreSQL. Made some minor changes
in views.py to incorporate the new models.
7 years ago
Kevin Mok
e07fd0965a
Added Vim folds to models.py and utils.py
7 years ago