Added isbn13 as well

This commit is contained in:
ltctceplrm 2023-12-19 20:39:26 +01:00
parent fe9f04126d
commit d21ac66061
2 changed files with 4 additions and 1 deletions

View file

@ -69,7 +69,8 @@ export class OpenLibraryAPI extends APIModel {
dataSource: this.apiName,
url: `https://openlibrary.org` + result.key,
id: result.key,
isbn: result.isbn[0] ?? 'unknown',
isbn: result.isbn.find((el: string | any[]) => el.length <= 10) ?? 'unknown',
isbn13: result.isbn.find((el: string | any[]) => el.length == 13) ?? 'unknown',
englishTitle: result.title_english ?? result.title,
author: result.author_name ?? 'unknown',