This commit is contained in:
mungai-njoroge
2023-08-02 14:26:19 +03:00
parent 9c9a187083
commit efb6aae927
4 changed files with 443 additions and 438 deletions
+3 -1
View File
@@ -58,7 +58,7 @@ class ArtistsCache:
"""
Returns the cached albums for the given artisthash.
"""
for (index, albums) in enumerate(cls.artists):
for index, albums in enumerate(cls.artists):
if albums.artisthash == artisthash:
return albums.albums, index
@@ -325,3 +325,5 @@ def get_similar_artists(artisthash: str):
similar = random.sample(similar, limit)
return {"artists": similar[:limit]}
# TODO: Rewrite this file using generators where possible