Persist stats exclusions in DB and fix word metrics filtering (#60)

This commit is contained in:
2026-05-03 20:06:13 -07:00
committed by GitHub
parent db30c61327
commit 0915b23dc8
33 changed files with 1890 additions and 208 deletions
@@ -52,7 +52,9 @@ import {
getKanjiWords,
getSessionEvents,
getSimilarWords,
getStatsExcludedWords,
getVocabularyStats,
replaceStatsExcludedWords,
getWordAnimeAppearances,
getWordDetail,
getWordOccurrences,
@@ -151,6 +153,7 @@ import {
type SessionSummaryQueryRow,
type SessionTimelineRow,
type SimilarWordRow,
type StatsExcludedWordRow,
type StreakCalendarRow,
type VocabularyCleanupSummary,
type WatchTimePerAnimeRow,
@@ -289,6 +292,7 @@ export type {
SessionSummaryQueryRow,
SessionTimelineRow,
SimilarWordRow,
StatsExcludedWordRow,
StreakCalendarRow,
WatchTimePerAnimeRow,
WordAnimeAppearanceRow,
@@ -498,6 +502,14 @@ export class ImmersionTrackerService {
return getVocabularyStats(this.db, limit, excludePos);
}
async getStatsExcludedWords(): Promise<StatsExcludedWordRow[]> {
return getStatsExcludedWords(this.db);
}
async replaceStatsExcludedWords(words: StatsExcludedWordRow[]): Promise<void> {
replaceStatsExcludedWords(this.db, words);
}
async cleanupVocabularyStats(): Promise<VocabularyCleanupSummary> {
return cleanupVocabularyStats(this.db, {
resolveLegacyPos: this.resolveLegacyVocabularyPos,