mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-04 00:41:33 -07:00
Persist stats exclusions in DB and fix word metrics filtering (#60)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user