add timestamp to favorite entries

+ convert useBisection into a function
This commit is contained in:
mungai-njoroge
2024-03-10 17:21:22 +03:00
committed by Mungai Njoroge
parent fb635ff35f
commit 766eb388b2
9 changed files with 95 additions and 52 deletions
+2 -2
View File
@@ -183,7 +183,7 @@ def get_all_artist_tracks(path: ArtistHashSchema):
"""
tracks = TrackStore.get_tracks_by_artisthash(path.artisthash)
return {"tracks": serialize_tracks(tracks)}
return serialize_tracks(tracks)
@api.get("/<artisthash>/similar")
@@ -208,7 +208,7 @@ def get_similar_artists(path: ArtistHashSchema, query: ArtistLimitSchema):
if len(similar) > limit:
similar = random.sample(similar, limit)
return {"artists": similar[:limit]}
return similar[:limit]
# TODO: Rewrite this file using generators where possible