mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-06 20:10:12 +02:00
fix missing artist name in lyrics search query for lrclib (#1871)
This commit is contained in:
@@ -58,14 +58,16 @@ export async function getSearchResults(
|
|||||||
): Promise<InternetProviderLyricSearchResponse[] | null> {
|
): Promise<InternetProviderLyricSearchResponse[] | null> {
|
||||||
let result: AxiosResponse<LrcLibSearchResponse[]>;
|
let result: AxiosResponse<LrcLibSearchResponse[]>;
|
||||||
|
|
||||||
if (!params.name) {
|
if (!params.name && !params.artist) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const searchQuery = [params.name, params.artist].join(' ');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = await axios.get<LrcLibSearchResponse[]>(SEEARCH_URL, {
|
result = await axios.get<LrcLibSearchResponse[]>(SEEARCH_URL, {
|
||||||
params: {
|
params: {
|
||||||
q: params.name,
|
q: searchQuery,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user