增加弹幕本地缓存
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
saveDanmakuMemory,
|
||||
saveDanmakuSettings,
|
||||
searchAnime,
|
||||
initDanmakuModule,
|
||||
} from '@/lib/danmaku/api';
|
||||
import type { DanmakuAnime, DanmakuSelection, DanmakuSettings } from '@/lib/danmaku/types';
|
||||
import { SearchResult, DanmakuFilterConfig } from '@/lib/types';
|
||||
@@ -272,6 +273,11 @@ function PlayPageClient() {
|
||||
danmakuSettingsRef.current = danmakuSettings;
|
||||
}, [danmakuSettings]);
|
||||
|
||||
// 初始化弹幕模块(清理过期缓存)
|
||||
useEffect(() => {
|
||||
initDanmakuModule();
|
||||
}, []);
|
||||
|
||||
// 加载弹幕过滤配置
|
||||
useEffect(() => {
|
||||
const loadFilterConfig = async () => {
|
||||
|
||||
Reference in New Issue
Block a user