major refactors

This commit is contained in:
geoffrey45
2022-03-30 14:56:40 +03:00
parent 1a19fb61cd
commit 0c1e792839
21 changed files with 164 additions and 322 deletions
+7 -3
View File
@@ -2,6 +2,7 @@
This library contains all the functions related to albums.
"""
from pprint import pprint
import urllib
from typing import List
from app import models, functions, helpers
@@ -52,9 +53,12 @@ def get_album_tracks(album: str, artist: str) -> List:
tracks = []
for track in api.PRE_TRACKS:
if track["album"] == album and track["albumartist"] == artist:
tracks.append(track)
try:
if track["album"] == album and track["albumartist"] == artist:
tracks.append(track)
except TypeError:
pprint(track, indent=4)
print(album, artist)
return tracks