feat(stats): separate YouTube channels in the Library (#253)

This commit is contained in:
2026-09-20 19:57:32 -07:00
committed by GitHub
parent 76e43d7e6d
commit 8097ed27e5
35 changed files with 888 additions and 81 deletions
@@ -45,6 +45,7 @@ function installDom(): () => void {
function libraryItem(animeId: number, title: string, episodeCount: number): AnimeLibraryItem {
return {
mediaKind: 'anime',
animeId,
canonicalTitle: title,
anilistId: null,
@@ -68,7 +69,9 @@ function findButton(container: Element, label: string): HTMLElement {
/** Library cards only expose aria-pressed while selection mode is on. */
function cardButtons(container: Element): HTMLButtonElement[] {
return [...container.querySelectorAll('button[aria-pressed]')] as unknown as HTMLButtonElement[];
return [
...container.querySelectorAll('.grid button[aria-pressed]'),
] as unknown as HTMLButtonElement[];
}
function mergeButton(container: Element): HTMLButtonElement {