fix library preview series counts

This commit is contained in:
ShukeBta
2026-07-02 01:16:37 +08:00
parent 5ecb5e2144
commit 5daee11c77
4 changed files with 83 additions and 5 deletions
+4
View File
@@ -8,6 +8,10 @@ export type LibraryPreview = {
cards: SeriesCard[]
}
export function isSeriesLibraryType(type?: string) {
return type === 'tv' || type === 'anime' || type === 'variety'
}
export function latestLibraryCards(items: Media[]): SeriesCard[] {
return groupSeries(items)
.sort((a, b) => mediaTime(b.rep) - mediaTime(a.rep) || artworkScore(b.rep) - artworkScore(a.rep))