try: fix search

This commit is contained in:
cwilvx
2025-02-25 20:53:39 +03:00
parent 7daa20e0df
commit 0a1ab72932
11 changed files with 196 additions and 181 deletions
+3 -1
View File
@@ -11,6 +11,7 @@ from flask_openapi3 import APIBlueprint
from app import models
from app.api.apischemas import GenericLimitSchema
from app.lib import searchlib
from app.serializers.artist import serialize_for_cards
from app.settings import Defaults
from app.store.tracks import TrackStore
@@ -61,7 +62,8 @@ class Search:
"""Calls :class:`SearchArtists` which returns the artists that fuzzily match
the search term. Then adds them to the `SearchResults` store.
"""
return searchlib.SearchArtists(self.query)()
artists = searchlib.SearchArtists(self.query)()
return serialize_for_cards(artists)
def search_albums(self):
"""Calls :class:`SearchAlbums` which returns the albums that fuzzily match