私人影库支持解析ova

This commit is contained in:
mtvpls
2026-01-03 16:40:39 +08:00
parent 2054e3122f
commit a10bf361a8
8 changed files with 62 additions and 23 deletions

View File

@@ -291,6 +291,10 @@ const DownloadEpisodeSelector: React.FC<DownloadEpisodeSelectorProps> = ({
if (!title) {
return episodeNumber;
}
// 如果是 OVA 格式,直接返回完整标题
if (title.match(/^OVA\s+\d+/i)) {
return title;
}
// 如果匹配"第X集"、"第X话"、"X集"、"X话"格式,提取中间的数字
const match = title.match(/(?:第)?(\d+)(?:集|话)/);
if (match) {

View File

@@ -676,6 +676,10 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
if (!title) {
return episodeNumber;
}
// 如果是 OVA 格式,直接返回完整标题
if (title.match(/^OVA\s+\d+/i)) {
return title;
}
// 如果匹配"第X集"、"第X话"、"X集"、"X话"格式,提取中间的数字(支持小数)
const match = title.match(/(?:第)?(\d+(?:\.\d+)?)(?:集|话)/);
if (match) {