fix: marlin search settings

This commit is contained in:
Fredrik Burmester
2025-01-02 17:18:01 +01:00
parent 77f14a7d5b
commit 730823c520
7 changed files with 235 additions and 226 deletions

View File

@@ -95,6 +95,8 @@ export default function search() {
return (searchApi.data.SearchHints as BaseItemDto[]) || [];
} else {
if (!settings?.marlinServerUrl) return [];
console.log(settings.marlinServerUrl);
const url = `${
settings.marlinServerUrl
}/search?q=${encodeURIComponent(query)}&includeItemTypes=${types
@@ -102,6 +104,9 @@ export default function search() {
.join("&includeItemTypes=")}`;
const response1 = await axios.get(url);
console.log(response1.statusText);
const ids = response1.data.ids;
if (!ids || !ids.length) return [];