优先使用刮削元数据匹配弹幕剧集

This commit is contained in:
truewhile
2026-09-12 10:27:55 +08:00
parent 1ff60d5641
commit e71d9d61d1
5 changed files with 262 additions and 30 deletions
+3 -3
View File
@@ -41,14 +41,14 @@ export interface DanmakuFetchResult {
anime_title?: string
episode_title?: string
episode_id?: number
match_mode?: 'hash' | 'filename' | 'search' | 'manual' | string
match_mode?: 'hash' | 'filename' | 'metadata' | 'search' | 'manual' | string
}
export interface DanmakuLoadedInfo {
animeTitle?: string
episodeTitle?: string
episodeId?: number | string
matchMode?: 'hash' | 'filename' | 'search' | 'manual' | string
matchMode?: 'hash' | 'filename' | 'metadata' | 'search' | 'manual' | string
totalCount: number
sourceType?: 'auto' | 'xml' | 'json'
/** Number of sources merged into the loaded comments (0 = not merged). */
@@ -97,4 +97,4 @@ export const danmakuAPI = {
merge_sources: settings.mergeSources,
})
.then((r) => r.data),
}
}
+7 -1
View File
@@ -109,6 +109,12 @@ export function PlayerDanmakuPanel({
<Tag size={10} /> 文件名匹配
</span>
)
case 'metadata':
return (
<span className="inline-flex items-center gap-0.5 rounded border border-cyan-500/30 bg-cyan-500/15 px-1.5 py-0.5 text-[10px] font-medium text-cyan-300">
<Search size={10} /> 刮削信息匹配
</span>
)
case 'search':
return (
<span className="inline-flex items-center gap-0.5 rounded border border-violet-500/30 bg-violet-500/15 px-1.5 py-0.5 text-[10px] font-medium text-violet-300">
@@ -469,4 +475,4 @@ function EpisodeRow({
<span className="min-w-0 flex-1 truncate">{episode.episodeTitle}</span>
</button>
)
}
}