fix: increase maximum size parameter in library service API calls to improve data retrieval

This commit is contained in:
Julien Froidefond
2025-12-07 09:53:41 +01:00
parent 121d01de2a
commit 4f5724c0ff

View File

@@ -56,7 +56,7 @@ export class LibraryService extends BaseApiService {
{ {
path: "series/list", path: "series/list",
params: { params: {
size: "1000", // On récupère un maximum de livres size: "5000", // On récupère un maximum de livres
}, },
}, },
headers, headers,
@@ -99,9 +99,10 @@ export class LibraryService extends BaseApiService {
if (search) { if (search) {
const searchLower = search.toLowerCase(); const searchLower = search.toLowerCase();
filteredSeries = filteredSeries.filter((series) => filteredSeries = filteredSeries.filter(
series.metadata.title.toLowerCase().includes(searchLower) || (series) =>
series.id.toLowerCase().includes(searchLower) series.metadata.title.toLowerCase().includes(searchLower) ||
series.id.toLowerCase().includes(searchLower)
); );
} }
@@ -162,10 +163,14 @@ export class LibraryService extends BaseApiService {
static async scanLibrary(libraryId: string, deep: boolean = false): Promise<void> { static async scanLibrary(libraryId: string, deep: boolean = false): Promise<void> {
try { try {
await this.fetchFromApi({ await this.fetchFromApi(
path: `libraries/${libraryId}/scan`, {
params: { deep: String(deep) } path: `libraries/${libraryId}/scan`,
}, {}, { method: "POST", noJson: true }); params: { deep: String(deep) },
},
{},
{ method: "POST", noJson: true }
);
} catch (error) { } catch (error) {
throw new AppError(ERROR_CODES.LIBRARY.SCAN_ERROR, { libraryId }, error); throw new AppError(ERROR_CODES.LIBRARY.SCAN_ERROR, { libraryId }, error);
} }