-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embed Image links #142
base: master
Are you sure you want to change the base?
Embed Image links #142
Changes from all commits
4ec25de
ae5e0e4
8335112
85719d6
1254671
0e56ab2
45eb17b
3d865db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just reupload the files but the actual changes are on lines MALAPI: 119, 153, 184 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,15 +108,15 @@ export class MALAPI extends APIModel { | |
url: result.url, | ||
id: result.mal_id, | ||
|
||
plot: result.synopsis, | ||
plot: result.synopsis ? result.synopsis.replace('[Written by MAL Rewrite]', '').trim() : '', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This and line 177 isnt need on the MALAPI.ts, this is suppose to remove the end comment return from pulling plot synopsis. No all of them had it and this was something i personally add on my end, that ened up getting pushed to PR, this doesnt need to be added. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this seems useful to keep |
||
genres: result.genres?.map((x: any) => x.name) ?? [], | ||
director: [], | ||
writer: [], | ||
studio: result.studios?.map((x: any) => x.name).join(', ') ?? 'unknown', | ||
duration: result.duration ?? 'unknown', | ||
onlineRating: result.score ?? 0, | ||
actors: [], | ||
image: result.images?.jpg?.image_url ?? '', | ||
image: this.plugin.settings.generateEmbedLinksForImages ? `` ?? '' : result.images?.jpg?.image_url ?? '', | ||
|
||
released: true, | ||
premiere: this.plugin.dateFormatter.format(result.aired?.from, this.apiDateFormat) ?? 'unknown', | ||
|
@@ -150,7 +150,7 @@ export class MALAPI extends APIModel { | |
duration: result.duration ?? 'unknown', | ||
onlineRating: result.score ?? 0, | ||
actors: [], | ||
image: result.images?.jpg?.image_url ?? '', | ||
image: this.plugin.settings.generateEmbedLinksForImages ? `` ?? '' : result.images?.jpg?.image_url ?? '', | ||
|
||
released: true, | ||
premiere: this.plugin.dateFormatter.format(result.aired?.from, this.apiDateFormat) ?? 'unknown', | ||
|
@@ -174,14 +174,15 @@ export class MALAPI extends APIModel { | |
url: result.url, | ||
id: result.mal_id, | ||
|
||
plot: result.synopsis ? result.synopsis.replace('[Written by MAL Rewrite]', '').trim() : '', | ||
genres: result.genres?.map((x: any) => x.name) ?? [], | ||
writer: [], | ||
studio: result.studios?.map((x: any) => x.name) ?? [], | ||
episodes: result.episodes, | ||
duration: result.duration ?? 'unknown', | ||
onlineRating: result.score ?? 0, | ||
streamingServices: result.streaming?.map((x: any) => x.name) ?? [], | ||
image: result.images?.jpg?.image_url ?? '', | ||
image: this.plugin.settings.generateEmbedLinksForImages ? `` ?? '' : result.images?.jpg?.image_url ?? '', | ||
|
||
released: true, | ||
airedFrom: this.plugin.dateFormatter.format(result.aired?.from, this.apiDateFormat) ?? 'unknown', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a better type for this, no? I am guessing
boardgame
has a type that can be used here.