Modified the PR by onesvat to add plot to media
I modified synopsis in manga to plot and added the plot in MALapi that also uses the movie model, I did the same thing for series
This commit is contained in:
parent
a31a6191cd
commit
57de3d614c
6 changed files with 13 additions and 4 deletions
|
|
@ -108,6 +108,7 @@ export class MALAPI extends APIModel {
|
|||
url: result.url,
|
||||
id: result.mal_id,
|
||||
|
||||
plot: result.synopsis,
|
||||
genres: result.genres?.map((x: any) => x.name) ?? [],
|
||||
producer: result.studios?.map((x: any) => x.name).join(', ') ?? 'unknown',
|
||||
duration: result.duration ?? 'unknown',
|
||||
|
|
@ -139,6 +140,7 @@ export class MALAPI extends APIModel {
|
|||
url: result.url,
|
||||
id: result.mal_id,
|
||||
|
||||
plot: result.synopsis,
|
||||
genres: result.genres?.map((x: any) => x.name) ?? [],
|
||||
producer: result.studios?.map((x: any) => x.name).join(', ') ?? 'unknown',
|
||||
duration: result.duration ?? 'unknown',
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export class MALAPIManga extends APIModel {
|
|||
new MangaModel({
|
||||
subType: type,
|
||||
title: result.title,
|
||||
synopsis: result.synopsis,
|
||||
plot: result.synopsis,
|
||||
englishTitle: result.title_english ?? result.title,
|
||||
alternateTitles: result.titles?.map((x: any) => x.title) ?? [],
|
||||
year: result.year ?? result.published?.prop?.from?.year ?? '',
|
||||
|
|
@ -98,7 +98,6 @@ export class MALAPIManga extends APIModel {
|
|||
const model = new MangaModel({
|
||||
subType: type,
|
||||
title: result.title,
|
||||
synopsis: result.synopsis,
|
||||
englishTitle: result.title_english ?? result.title,
|
||||
alternateTitles: result.titles?.map((x: any) => x.title) ?? [],
|
||||
year: result.year ?? result.published?.prop?.from?.year ?? '',
|
||||
|
|
@ -106,6 +105,7 @@ export class MALAPIManga extends APIModel {
|
|||
url: result.url,
|
||||
id: result.mal_id,
|
||||
|
||||
plot: result.synopsis,
|
||||
genres: result.genres?.map((x: any) => x.name) ?? [],
|
||||
authors: result.authors?.map((x: any) => x.name) ?? [],
|
||||
chapters: result.chapters,
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ export class OMDbAPI extends APIModel {
|
|||
url: `https://www.imdb.com/title/${result.imdbID}/`,
|
||||
id: result.imdbID,
|
||||
|
||||
plot: result.Plot ?? '',
|
||||
genres: result.Genre?.split(', ') ?? [],
|
||||
producer: result.Director ?? 'unknown',
|
||||
duration: result.Runtime ?? 'unknown',
|
||||
|
|
@ -163,6 +164,7 @@ export class OMDbAPI extends APIModel {
|
|||
url: `https://www.imdb.com/title/${result.imdbID}/`,
|
||||
id: result.imdbID,
|
||||
|
||||
plot: result.Plot ?? '',
|
||||
genres: result.Genre?.split(', ') ?? [],
|
||||
studios: [result.Director] ?? 'unknown',
|
||||
episodes: 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue