mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
add tags to anime cards, use fallback for title if no subtype is provided/available
This commit is contained in:
parent
2bb389ad93
commit
e4c0934d8e
3 changed files with 13 additions and 4 deletions
|
@ -33,8 +33,12 @@ function renderAnimeResultsPage(context, res, includeSupplementalData = true){
|
|||
// Render Description
|
||||
if(res.subtitle) result.description += `-# ${res.subtitle}\n\n`;
|
||||
if(res.type !== "ANIME") result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.type]) + " "
|
||||
if(res.subtype) result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.subtype]) + " "
|
||||
if(res.genres) result.description += res.genres.map((r)=>smallPill(r)).join(" ") + "\n\n";
|
||||
else {
|
||||
if(res.subtype) result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.subtype]) + " "
|
||||
else result.description += pill(OMNI_ANIME_FORMAT_TYPES[res.type]) + " "
|
||||
}
|
||||
if(res.genres) result.description += res.genres.map((r)=>smallPill(r)).join(" ") + "\n";
|
||||
if(res.tags) result.description += "-# " + res.tags.map((t)=>smallPill(t)).join(" ") + "\n\n";
|
||||
if(res.description) result.description += stringwrapPreserveWords(res.description, 600);
|
||||
if(res.attribution?.description) result.description += `\n\n-# Source • ${res.attribution.description}`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue