diff --git a/src/AniList/GraphQL/DiscoverSectionsAndSearch.ts b/src/AniList/GraphQL/DiscoverSectionsAndSearch.ts index ddfc08c2..eb20f53f 100644 --- a/src/AniList/GraphQL/DiscoverSectionsAndSearch.ts +++ b/src/AniList/GraphQL/DiscoverSectionsAndSearch.ts @@ -61,6 +61,7 @@ query Query( large medium } + description format genres id @@ -130,6 +131,7 @@ type DiscoverSectionsAndSearchMedia = { averageScore: number | null; chapters: number | null; coverImage: DiscoverSectionsAndSearchCoverImage; + description: string | null; format: string; genres: string[]; id: number; diff --git a/src/AniList/Implementations/helper.ts b/src/AniList/Implementations/helper.ts index 23fe98b4..892a0bca 100644 --- a/src/AniList/Implementations/helper.ts +++ b/src/AniList/Implementations/helper.ts @@ -86,6 +86,7 @@ export async function getItems( } let supertitle; + let summary; let infoItems; if (featured) { let author, artist; @@ -116,10 +117,14 @@ export async function getItems( supertitle = artist; } + if (searchResult) { + summary = searchResult.description?.replaceAll(/
||<\/i>||<\/a>/g, ""); + } + if (searchResult.averageScore) { infoItems = [ + { symbol: "star", text: `${searchResult.averageScore}%` }, { symbol: "book", text: subtitle }, - { symbol: "percent", text: `${searchResult.averageScore}` }, ] as const; } } @@ -131,6 +136,7 @@ export async function getItems( contentRating, subtitle, supertitle, + summary, infoItems, } as ResultItemType); } diff --git a/src/AniList/pbconfig.ts b/src/AniList/pbconfig.ts index 20d32383..049f302d 100644 --- a/src/AniList/pbconfig.ts +++ b/src/AniList/pbconfig.ts @@ -6,7 +6,7 @@ import { ContentRating, type ExtensionInfo, SourceIntents } from "@paperback/typ export default { name: "AniList", description: "Extension that integrates with anilist.co for tracking and collection management.", - version: "1.0.0-alpha.17", + version: "1.0.0-alpha.18", icon: "icon.png", language: "en", contentRating: ContentRating.EVERYONE,