fix(identity): persist verified auxiliary season mappings and reuse source ids
This commit is contained in:
1 parent
c85b139ec4
commit
ee0d62ae6f
15 files changed
+397
-38
No files matched your search
@@ -647,6 +647,12 @@ function walkTokens(tokens: string[], d: Draft): void {
|
||||
stop("complete");
|
||||
continue;
|
||||
}
|
||||
if ((u === "BATCH" || u === "合集" || u === "全集") && d.episodes) {
|
||||
d._complete = true;
|
||||
ev.push("pack:batch");
|
||||
stop("complete");
|
||||
continue;
|
||||
}
|
||||
if ((u === "FIN" || u === "END") && d.episodes) {
|
||||
d._fin = true;
|
||||
ev.push("pack:fin");
|
||||
@@ -1017,6 +1023,13 @@ export function parseRelease(input: string, opts: ParseOptions = {}): ParsedRele
|
||||
ev.push("pack:fin");
|
||||
return MARK_HARD;
|
||||
});
|
||||
// BT 动漫明确区间:名称后的「 - 01-12」不是片名,Batch/合集标记另决定是否整季包。
|
||||
s = s.replace(/\s-\s(\d{1,3})(?:v\d)?\s*[-~]\s*(\d{1,3})(?:v\d)?(?=\s|\[|【|$)/u, (all, a: string, b: string) => {
|
||||
if (d.episodes || Number(b) < Number(a)) return all;
|
||||
d.episodes = { start: Number(a), end: Number(b) };
|
||||
ev.push("episode:anime_dash_range");
|
||||
return MARK_HARD;
|
||||
});
|
||||
// `Travis - 12 Memories`:数字后紧跟一个普通单词时是片名的一部分,不是集号
|
||||
s = s.replace(
|
||||
/\s-\s(\d{1,3})(?:v\d)?(?=\s|\[|【|$)(?!\s+(?!(?:END|Fin|Final|RAW)\b)[A-Za-z][a-z]+\b)/u,
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { ContentType } from "@umt/contracts";
|
||||
import type { CompiledGlobalWord } from "../identify-words/apply.ts";
|
||||
|
||||
/** 解析器版本:规则变化时递增,缓存/识别结果按此失效 */
|
||||
export const PARSER_VERSION = 2;
|
||||
export const PARSER_VERSION = 3;
|
||||
|
||||
export type Resolution = "4320p" | "2160p" | "1440p" | "1080p" | "1080i" | "720p" | "576p" | "480p";
|
||||
|
||||
|
||||
Reference in new issue
Block a user