updated Spotify to have a CACHE TIME config constant var, moved tracks folder to export inside Spotify explicit folder

the tracks folder was relative of the main WSGI python file due to me using my sys.path[0] method of finding the current folder the file was in, unfortunately this ends up being unreliable when put into practice
This commit is contained in:
Xevion
2019-12-21 02:34:11 -06:00
parent 2e4594138a
commit c87b9bdd7d
3 changed files with 5 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ import matplotlib.pyplot as plt
# Gets all files in tracks folder, returns them in parsed JSON
def get_files():
folder = os.path.join(sys.path[0], 'tracks')
folder = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'tracks')
files = []
for file in os.listdir(folder):
with open(os.path.join(os.path.join(folder, file))) as file: