File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ export class OpenLibraryAPI extends APIModel {
4141 year : result . first_publish_year ,
4242 dataSource : this . apiName ,
4343 id : result . key ,
44+ author : result . author_name ?? 'unknown' ,
4445 } as BookModel ) ,
4546 ) ;
4647 }
@@ -69,6 +70,8 @@ export class OpenLibraryAPI extends APIModel {
6970 dataSource : this . apiName ,
7071 url : `https://openlibrary.org` + result . key ,
7172 id : result . key ,
73+ isbn : result . isbn . find ( ( el : string | any [ ] ) => el . length <= 10 ) ?? 'unknown' ,
74+ isbn13 : result . isbn . find ( ( el : string | any [ ] ) => el . length == 13 ) ?? 'unknown' ,
7275 englishTitle : result . title_english ?? result . title ,
7376
7477 author : result . author_name ?? 'unknown' ,
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ export class BookModel extends MediaTypeModel {
99 image : string ;
1010 onlineRating : number ;
1111 english_title : string ;
12+ isbn : number ;
13+ isbn13 : number ;
1214
1315 released : boolean ;
1416
@@ -25,6 +27,8 @@ export class BookModel extends MediaTypeModel {
2527 this . pages = undefined ;
2628 this . image = undefined ;
2729 this . onlineRating = undefined ;
30+ this . isbn = undefined ;
31+ this . isbn13 = undefined ;
2832
2933 this . released = undefined ;
3034
@@ -52,6 +56,6 @@ export class BookModel extends MediaTypeModel {
5256 }
5357
5458 getSummary ( ) : string {
55- return this . englishTitle + ' (' + this . year + ')' ;
59+ return this . englishTitle + ' (' + this . year + ') - ' + this . author ;
5660 }
5761}
You can’t perform that action at this time.
0 commit comments