diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/Data/AniList/forum.ts | 5 | ||||
| -rw-r--r-- | src/lib/Tools/EpisodeDiscussionCollector.svelte | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/Data/AniList/forum.ts b/src/lib/Data/AniList/forum.ts index a96b74ca..b2467c9e 100644 --- a/src/lib/Data/AniList/forum.ts +++ b/src/lib/Data/AniList/forum.ts @@ -11,6 +11,9 @@ export interface Thread { medium: string; }; }[]; + categories: { + name: string; + }[]; } export interface ThreadPage { @@ -35,7 +38,7 @@ const threadPage = async (page: number, userId: number): Promise<ThreadPage> => }, body: JSON.stringify({ query: `{ Page(perPage: 50, page: ${page}) { - threads(userId: ${userId}) { id title createdAt mediaCategories { coverImage { extraLarge medium } } } + threads(userId: ${userId}) { id title createdAt mediaCategories { coverImage { extraLarge medium } } categories { name } } pageInfo { hasNextPage } } }` }) diff --git a/src/lib/Tools/EpisodeDiscussionCollector.svelte b/src/lib/Tools/EpisodeDiscussionCollector.svelte index 4c61f3cf..b14c655b 100644 --- a/src/lib/Tools/EpisodeDiscussionCollector.svelte +++ b/src/lib/Tools/EpisodeDiscussionCollector.svelte @@ -21,9 +21,9 @@ {#await threads(submission)} <Skeleton card={false} count={5} height="0.9rem" list /> {:then threads} - <ul> + <ol reversed> {#each threads - .filter((thread) => thread.title.includes('[Spoilers]') && thread.title.includes('Episode')) + .filter( (thread) => thread.categories.some( (category) => category.name.includes('Release Discussion') ) ) .sort((a, b) => b.createdAt - a.createdAt) as thread} <li> <span class="opaque" style="white-space: pre;"> @@ -43,7 +43,7 @@ </a> </li> {/each} - </ul> + </ol> {:catch} <p>Threads could not be loaded. You might have been rate-limited.</p> <p> |