diff --git a/src/index.ts b/src/index.ts index 91f847c..f0ecb4b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -78,7 +78,7 @@ async function getMangaList (page: string, pageSize: string, keyword?: string, r const result: IGetMangaListResult = { list: response.content.map(item => ({ - title: item.name, + title: item.metadata.title || item.name, url: JSON.stringify({ seriesId: item.id, libraryId: item.libraryId @@ -126,7 +126,7 @@ async function getMangaData (metadata: string) { const response = JSON.parse(rawResponse) as KomgaBooksResponse result.chapterList = response.content.map(item => ({ - title: item.name, + title: item.metadata.title || item.name, url: item.id // BookId. })) } catch (error) { @@ -140,7 +140,7 @@ async function getMangaData (metadata: string) { method: 'GET' }) const response = JSON.parse(rawResponse) as KomgaSeriesResponse - result.title = response.name + result.title = response.metadata.title || response.name result.description = response.metadata.summary } catch (error) { return window.Rulia.endWithException((error as Error).message)