Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

refactor(review): 核查结算的决策与规则名改号为 ADR-0139

longmeidaoba6ba16bb2dd
diff --git a/docs/REUSE.md b/docs/REUSE.md
index 31ddde660..a94352a43 100644
--- a/docs/REUSE.md
+++ b/docs/REUSE.md
@@ -604,7 +604,7 @@ OneJAV、Free JAV Torrent 只给种子链接。这类条目经索引器同源的
复核用 Checkbox、Button、Badge、Select 与 `/api/review/decision`,默认勾选、沿用馆藏页 Shift 连选;支持跨组通过/拒绝与无歧义的共同来源选择。按候选数量、来源组合或字段分组,每项只出现一次,切组保留选择;成功移出、失败保留,离开页面即停。整页在 `frontend/src/react/review/`,一条队列一个 `queryKey`,判定后改缓存不重取。React Aria Components 1.22.1 的 `Radio`/`Checkbox` 继续承载原生焦点与方向键;共用 `base.css` 将隐藏输入框的定位归于所属标签,来源切换只滚动卡片正文,分段单选、媒体库图标选择和复选框使用同一定位基线,不新增依赖。批准回执在同一事务中读取实际资产版本,缓存只推进仍持有该次写入前版本的候选;逐项与批量提交共用缓存中的并发凭据。身份候选用创作者页、作品详情与 revealSource 核对样本;来源图与缺图占位共用 220px 预览区,样本支持无缩略图作品,回收站不参与。
-本地 NFO 配对复用 `library_nfo`、`catalog_rules` 的番号与分卷识别、标准库 ElementTree 及现有资料补空流程。[Kodi NFO 文档](https://kodi.wiki/view/NFO_files/Movies)的同名文件与 `movie.nfo` 约定于 2026-10-17 核对;只参照公开格式,没有复制外部源码。Peach 保留同番号分卷共享、同名文件优先、多份匹配拒绝、内容番号冲突检查和输入安全限制。Kodi 整套媒体中心没有作为依赖引入;标准库随 Python 3.14 运行,无额外体积或许可证。NFO 读取后复用来源缓存与缺失缓存核查在线字段;`requires_review` 跟随候选标出核查差异,差异按 ADR-0137 的判据结算,判不了的交人,人工决定保存已展示的候选身份,见 ADR-0108。隔离媒体与账本回归覆盖共用 NFO、不同作品混放、错误 NFO 继续在线补全、补空与覆盖分流,以及连续批准的版本回执;真实反馈的 NFO 样本尚未取得,无新增依赖。
+本地 NFO 配对复用 `library_nfo`、`catalog_rules` 的番号与分卷识别、标准库 ElementTree 及现有资料补空流程。[Kodi NFO 文档](https://kodi.wiki/view/NFO_files/Movies)的同名文件与 `movie.nfo` 约定于 2026-10-17 核对;只参照公开格式,没有复制外部源码。Peach 保留同番号分卷共享、同名文件优先、多份匹配拒绝、内容番号冲突检查和输入安全限制。Kodi 整套媒体中心没有作为依赖引入;标准库随 Python 3.14 运行,无额外体积或许可证。NFO 读取后复用来源缓存与缺失缓存核查在线字段;`requires_review` 跟随候选标出核查差异,差异按 ADR-0139 的判据结算,判不了的交人,人工决定保存已展示的候选身份,见 ADR-0108。隔离媒体与账本回归覆盖共用 NFO、不同作品混放、错误 NFO 继续在线补全、补空与覆盖分流,以及连续批准的版本回执;真实反馈的 NFO 样本尚未取得,无新增依赖。
## 本机设置与卸载
diff --git a/docs/adr/0108-nfo-verification-and-reviewed-overwrites.md b/docs/adr/0108-nfo-verification-and-reviewed-overwrites.md
index e41c4e3ad..51afa919c 100644
--- a/docs/adr/0108-nfo-verification-and-reviewed-overwrites.md
+++ b/docs/adr/0108-nfo-verification-and-reviewed-overwrites.md
@@ -3,7 +3,7 @@
- 状态:Accepted
- 日期:2026-10-17
- 依据:用户要求先读取本地 NFO,扫描刮削时仍查询来源;补漏无需复核,覆盖已有值必须复核。
-- 修订:[ADR-0137](0137-verification-differences-settle-by-rule.md) 让核查差异按确定判据结算,只有判据给不出结论的、以及 NFO 与链首来源说法不一的仍交人
+- 修订:[ADR-0139](0139-verification-differences-settle-by-rule.md) 让核查差异按确定判据结算,只有判据给不出结论的、以及 NFO 与链首来源说法不一的仍交人
## 决策
diff --git a/docs/adr/0137-verification-differences-settle-by-rule.md b/docs/adr/0139-verification-differences-settle-by-rule.md
similarity index 98%
rename from docs/adr/0137-verification-differences-settle-by-rule.md
rename to docs/adr/0139-verification-differences-settle-by-rule.md
index 40d251c24..3c8fc8c8e 100644
--- a/docs/adr/0137-verification-differences-settle-by-rule.md
+++ b/docs/adr/0139-verification-differences-settle-by-rule.md
@@ -1,4 +1,4 @@
-# ADR-0137:核查差异按确定判据结算,复核页只留要人判的
+# ADR-0139:核查差异按确定判据结算,复核页只留要人判的
- 状态:已采纳
- 日期:2026-11-04
@@ -41,8 +41,8 @@ ADR-0108 记的是用户 10-17 的要求:「补漏无需复核,覆盖已有
**三、可撤回的写入只有两种。**
-- **标签并集。** 证据候选里认得出、账本没有的标签按链上先后补上,一个不删。复用 ADR-0082 的并集写法,标签行归属是批次号 `auto:metadata-tags@<时间>`。决定记 `rule: adr-0137-verified-tags-union`、`added_tags`、各次 `batches` 与当时全部候选身份。之后又收录了生词时,下一轮照样补。人批准过、已过期的标签决定按 ADR-0082 只增不删,原决定只追加 `added_tags` 与候选身份。
-- **官方一致的标题与日期覆盖。** 链首那一档有异议的来源取值一致、现值不归人、没有更靠前的来源写过、番号身份核得上(`_auto_apply_targets`),按链首那一家覆盖,归属 `auto:<来源>`。决定记 `rule: adr-0137-official-replaces-verified`、批次号,以及每条资产覆盖前的取值与归属(`previous`)。
+- **标签并集。** 证据候选里认得出、账本没有的标签按链上先后补上,一个不删。复用 ADR-0082 的并集写法,标签行归属是批次号 `auto:metadata-tags@<时间>`。决定记 `rule: adr-0139-verified-tags-union`、`added_tags`、各次 `batches` 与当时全部候选身份。之后又收录了生词时,下一轮照样补。人批准过、已过期的标签决定按 ADR-0082 只增不删,原决定只追加 `added_tags` 与候选身份。
+- **官方一致的标题与日期覆盖。** 链首那一档有异议的来源取值一致、现值不归人、没有更靠前的来源写过、番号身份核得上(`_auto_apply_targets`),按链首那一家覆盖,归属 `auto:<来源>`。决定记 `rule: adr-0139-official-replaces-verified`、批次号,以及每条资产覆盖前的取值与归属(`previous`)。
`scripts/revert_auto_landing.py --source <规则名> [--batch …]` 按决定撤回:并集删掉那一行补进的标签,覆盖把旧值与旧归属原样写回,之后被别人改过的资产不动。两种都删掉决定,下一轮按那时的判据重判,所以先改判据再撤。并集补的标签与 ADR-0082 同一个批次前缀,`--source auto:metadata-tags` 也能删掉它们,但决定里的规则名还在,下一轮会照样补回来。
diff --git a/scripts/revert_auto_landing.py b/scripts/revert_auto_landing.py
index de8911b72..3d3692a67 100644
--- a/scripts/revert_auto_landing.py
+++ b/scripts/revert_auto_landing.py
@@ -31,8 +31,8 @@ id 或路径已被别的行占用时那一批拒绝撤回。登记时自动接
「想要」清单的入库对账记在 `want_item.acquired_source` 与 `acquired_batch`(批次号
`auto:want-acquired@<登记时刻>`)。撤回把那几条改回待找,查找计数原样留着。
-核查差异按确定判据结算的两条(ADR-0137)按规则名撤:`adr-0137-official-replaces-verified`
-按 note 的 `previous` 把旧值与旧归属还原,之后被别人改过的资产不动;`adr-0137-verified-tags-union`
+核查差异按确定判据结算的两条(ADR-0139)按规则名撤:`adr-0139-official-replaces-verified`
+按 note 的 `previous` 把旧值与旧归属还原,之后被别人改过的资产不动;`adr-0139-verified-tags-union`
删掉那一行补进的标签。两条都删掉决定,`--batch` 给 note 里记的批次号。先改判据再撤。
西方发行方的无番号作品封面(`ASSET-ID-<id>.jpg`)在 `.scraping.json` 边车里记 `source` 与 `batch`
@@ -50,7 +50,7 @@ id 或路径已被别的行占用时那一批拒绝撤回。登记时自动接
revert_auto_landing.py --source auto:seed --batch auto:seed@2026-09-25
revert_auto_landing.py --source adr-0079-fc2-descriptive-performer
revert_auto_landing.py --source auto:metadata-tags
- revert_auto_landing.py --source adr-0137-official-replaces-verified
+ revert_auto_landing.py --source adr-0139-official-replaces-verified
revert_auto_landing.py --source auto:vanished-reattach --batch auto:vanished-reattach@3
revert_auto_landing.py --source auto:want-acquired
revert_auto_landing.py --source auto:western-artwork --batch auto:western-artwork@20261008T000000Z
diff --git a/src/peach/metadata_auto_apply.py b/src/peach/metadata_auto_apply.py
index 63c9ff699..bbdf688f9 100644
--- a/src/peach/metadata_auto_apply.py
+++ b/src/peach/metadata_auto_apply.py
@@ -960,12 +960,12 @@ def _verification_difference(connection, row: dict) -> bool:
for candidate in row.get("candidates") or _parsed_candidates(row))
-#: 核查差异的四种去向(ADR-0137)。保留现值与交人都不写账本;并集只插账本没有的标签;
+#: 核查差异的四种去向(ADR-0139)。保留现值与交人都不写账本;并集只插账本没有的标签;
#: 覆盖只在官方来源一致、现值不归人时发生,note 记下旧值,撤回按它还原。
VERIFY_KEEP, VERIFY_UNION, VERIFY_REPLACE, VERIFY_REVIEW = "keep", "union", "replace", "review"
#: 两条会写账本的规则名,也是 `revert_auto_landing.py --source` 认的那个名字。
-VERIFIED_UNION_RULE = "adr-0137-verified-tags-union"
-VERIFIED_REPLACE_RULE = "adr-0137-official-replaces-verified"
+VERIFIED_UNION_RULE = "adr-0139-verified-tags-union"
+VERIFIED_REPLACE_RULE = "adr-0139-official-replaces-verified"
#: 覆盖时能改的列。厂牌与系列在账本里是实体,换值连带改作品关联与实体,撤回还不了原样,
#: 官方说法不一致时交人。
_VERIFIED_REPLACE_FIELDS = frozenset({"title", "original_title", "release_date"})
@@ -1105,7 +1105,7 @@ def _verified_tags(row: dict, evidence: list[dict], current: str) -> Verificatio
sources.append(candidate)
new.update((normalize_entity_name(tag), tag) for tag in added)
if not new:
- return Verification(VERIFY_KEEP, "adr-0137-no-new-information")
+ return Verification(VERIFY_KEEP, "adr-0139-no-new-information")
return Verification(VERIFY_UNION, VERIFIED_UNION_RULE,
tags=tuple(new), sources=tuple(sources))
@@ -1174,7 +1174,7 @@ def verification_outcome(connection, row: dict, *, assets=None) -> Verification
if not _verification_difference(connection, row):
return None
if row.get("asset_path") and _pinned_asset_id(connection, row) is None:
- return Verification(VERIFY_KEEP, "adr-0137-asset-gone")
+ return Verification(VERIFY_KEEP, "adr-0139-asset-gone")
field = str(row.get("field") or "").strip()
code = str(row.get("code") or "").strip()
current = str(row.get("current_value") or "").strip()
@@ -1186,13 +1186,13 @@ def verification_outcome(connection, row: dict, *, assets=None) -> Verification
outcome = _verified_tags(row, evidence, current)
if outcome.kind == VERIFY_UNION and not _auto_apply_targets(
connection, row, code, field, assets):
- return Verification(VERIFY_REVIEW, "adr-0137-identity-unverified")
+ return Verification(VERIFY_REVIEW, "adr-0139-identity-unverified")
return outcome
owners = _current_owners(connection, row, field, assets)
if any(is_protected(owner) for owner in owners):
- return Verification(VERIFY_KEEP, "adr-0137-user-owned")
+ return Verification(VERIFY_KEEP, "adr-0139-user-owned")
if field == "release_date" and current == code_release_date(code):
- return Verification(VERIFY_KEEP, "adr-0137-code-date")
+ return Verification(VERIFY_KEEP, "adr-0139-code-date")
dissent = _Dissent.of(connection, field, code, evidence, current)
kept = dissent.keeps_current()
if kept:
@@ -1228,11 +1228,11 @@ class _Dissent:
def keeps_current(self) -> str:
"""现值不必动、也不必问人时返回规则名,否则返回空串。"""
if not self.fresh:
- return "adr-0137-no-new-information" if self.evidence else "adr-0137-no-evidence"
+ return "adr-0139-no-new-information" if self.evidence else "adr-0139-no-evidence"
if not self.leading:
- return "adr-0137-community-dissent"
+ return "adr-0139-community-dissent"
if self.backers - {LOCAL_NFO_SOURCE}:
- return "adr-0137-official-backs-current"
+ return "adr-0139-official-backs-current"
return ""
@@ -1252,27 +1252,27 @@ def _settle_leading_dissent(connection, row: dict, dissent: _Dissent, owners: se
# 核查要做的事(ADR-0108),链在这里替人取舍就等于没有核查。
if (dissent.backers or {owner.partition(":")[2] for owner in owners} == {LOCAL_NFO_SOURCE}
or any(str(c.get("source") or "").strip() == LOCAL_NFO_SOURCE for c in leading)):
- return Verification(VERIFY_REVIEW, "adr-0137-nfo-dissent")
+ return Verification(VERIFY_REVIEW, "adr-0139-nfo-dissent")
winner = _preferred_candidate(field, leading, code=code)
if _chain_wrote_current(field, code, owners, winner):
- return Verification(VERIFY_KEEP, "adr-0137-chain-keeps-current")
+ return Verification(VERIFY_KEEP, "adr-0139-chain-keeps-current")
if field == "performers":
- return Verification(VERIFY_REVIEW, "adr-0137-official-performers")
+ return Verification(VERIFY_REVIEW, "adr-0139-official-performers")
if field in {"studio", "series"}:
keys = {_entity_identity_key(connection, field, str(c.get("display_value") or "").strip())
for c in leading}
else:
keys = {_candidate_value_key(connection, field, candidate) for candidate in leading}
if None in keys or len(keys) != 1:
- return Verification(VERIFY_REVIEW, "adr-0137-official-disagree")
+ return Verification(VERIFY_REVIEW, "adr-0139-official-disagree")
if field not in _VERIFIED_REPLACE_FIELDS:
- return Verification(VERIFY_REVIEW, "adr-0137-official-entity")
+ return Verification(VERIFY_REVIEW, "adr-0139-official-entity")
date = code_release_date(code) if field == "release_date" else None
if date is not None and str(winner.get("display_value") or "").strip() != date:
- return Verification(VERIFY_REVIEW, "adr-0137-code-date-disagrees")
+ return Verification(VERIFY_REVIEW, "adr-0139-code-date-disagrees")
if (not _auto_apply_targets(connection, row, code, field, assets)
or (is_korean_mib_code(code) and not _only_mib_official(row))):
- return Verification(VERIFY_REVIEW, "adr-0137-identity-unverified")
+ return Verification(VERIFY_REVIEW, "adr-0139-identity-unverified")
return Verification(VERIFY_REPLACE, VERIFIED_REPLACE_RULE, candidate=winner)
@@ -1350,7 +1350,7 @@ def metadata_auto_apply_candidate(connection, row: dict, *,
本地 NFO 不在登记表里,却同样构成证据(ADR-0029):采集时它的番号已经和文件名
对过,第 3 条照样再核一遍。NFO 核查的覆盖候选带 `requires_review`,已有值的差异只走
- `verification_outcome` 那一套判据(ADR-0137);来源链只决定补空采用哪一份。
+ `verification_outcome` 那一套判据(ADR-0139);来源链只决定补空采用哪一份。
"""
field = str(row.get("field") or "").strip()
if field not in AUTO_APPLY_FIELDS:
@@ -1826,7 +1826,7 @@ def auto_apply_metadata(database, candidate_root, *, batch_size=AUTO_APPLY_BATCH
标签按并集补上(`_land_collected_genres`,ADR-0082)。落不下去的
FC2 出演者行里一个艺名都没有的,写一条 `rejected`(`fc2_descriptive_rejection`,
ADR-0079),其余照旧留给人。核查差异(带 `requires_review` 的已有值差异)只按
- `verification_outcome` 结算(ADR-0137):保留现值的计进 `kept`,并集与覆盖落库。
+ `verification_outcome` 结算(ADR-0139):保留现值的计进 `kept`,并集与覆盖落库。
`database` 是调用方已经在用的那一个 `LedgerDatabase`:写锁与提交后的缓存失效都挂在
实例上,自己再 new 一个就绕开了两者。`active` 返回假时停在批与批之间,已经提交的
@@ -2076,7 +2076,7 @@ def _land_verified_union(connection, item_key: str, prior: dict | None, row: dic
def planned_verified_revert(connection, source: str, batch: str = "") -> list[dict]:
- """`revert_auto_landing.py --source <规则名>` 要撤的核查结算(ADR-0137)。
+ """`revert_auto_landing.py --source <规则名>` 要撤的核查结算(ADR-0139)。
覆盖那条按 note 的 `previous` 还原每条资产的旧值与旧归属;之后被别人改过的资产
(值或归属已不是这次写下的)不动,计划里记 `changed`。并集那条删掉这次补进的标签。
diff --git a/src/peach/upgrade_repairs.py b/src/peach/upgrade_repairs.py
index 498027a5c..c4ca26fa3 100644
--- a/src/peach/upgrade_repairs.py
+++ b/src/peach/upgrade_repairs.py
@@ -229,7 +229,7 @@ class UpgradeRepairs:
atomic_write_text(self.receipt, json.dumps(receipt, ensure_ascii=False))
def _settle_verification(self) -> None:
- """核查差异的结算规则(ADR-0137)对存量候选跑一遍,规则版本变了才再跑。
+ """核查差异的结算规则(ADR-0139)对存量候选跑一遍,规则版本变了才再跑。
只喂带核查标记的那些行:其余候选的判据没变,这一步不替它们重判。有要处理的行才
先备份;结果连同规则版本记进 `ledger_upgrade_repair`,账本恢复到之前的备份时会重跑。
diff --git a/src/peach/upgrade_rules.py b/src/peach/upgrade_rules.py
index 9dd2ffea2..e69b5a632 100644
--- a/src/peach/upgrade_rules.py
+++ b/src/peach/upgrade_rules.py
@@ -8,5 +8,5 @@ PUBLIC_SNAPSHOTS = 2
PROVIDER_EVIDENCE = 2
PROVIDER_TEXT = 3
OFFICIAL_COVER_CATALOG_MISSES = 1
-#: 核查差异按确定判据结算(ADR-0137)。判据改了就加一,升级时对存量候选再结算一遍。
+#: 核查差异按确定判据结算(ADR-0139)。判据改了就加一,升级时对存量候选再结算一遍。
VERIFICATION_SETTLEMENT = 1
diff --git a/src/peach/web_review.py b/src/peach/web_review.py
index 221e4d57f..928d7bfb1 100644
--- a/src/peach/web_review.py
+++ b/src/peach/web_review.py
@@ -347,7 +347,7 @@ def _metadata_queue_rows(connection, rows: list[dict],
# MIB 官网(kmib)的候选是例外:那是这批番号自己的发行方。
rows = [row for row in rows
if not is_korean_mib_code(str(row.get("code") or "")) or _only_mib_official(row)]
- # 核查差异(ADR-0108)的去向只由 `verification_outcome` 定(ADR-0137):要人判的
+ # 核查差异(ADR-0108)的去向只由 `verification_outcome` 定(ADR-0139):要人判的
# 绕过下面几道过滤留在队列里,保留现值、并集与覆盖的那些不占队列——后两种由处理任务
# 落库,判据与这里是同一份。
assets = code_assets(connection, rows)
diff --git a/tests/test_metadata_library.py b/tests/test_metadata_library.py
index 1956d7bbb..b188e75b1 100644
--- a/tests/test_metadata_library.py
+++ b/tests/test_metadata_library.py
@@ -270,7 +270,7 @@ class LibraryNfoTests(unittest.TestCase):
@windows_ledger_roots
def test_a_later_source_only_adds_tags_to_a_field_filled_during_the_run(self):
- """本轮先补上的标签,后来的来源只按并集补新增的(ADR-0137),一个不删、不进复核页。"""
+ """本轮先补上的标签,后来的来源只按并集补新增的(ADR-0139),一个不删、不进复核页。"""
media = self.root / 'media'
media.mkdir()
(media / 'SSIS-057.mp4').write_bytes(b'video')
diff --git a/tests/test_metadata_verification.py b/tests/test_metadata_verification.py
index ad4e7f501..55a75cbc8 100644
--- a/tests/test_metadata_verification.py
+++ b/tests/test_metadata_verification.py
@@ -1,4 +1,4 @@
-"""核查差异按确定判据结算(ADR-0137):保留现值、并集补标签、官方一致覆盖与撤回、交人。
+"""核查差异按确定判据结算(ADR-0139):保留现值、并集补标签、官方一致覆盖与撤回、交人。
样例取自 2026-11-04 复核页快照里的真实行,每条规则一类正例,外加「看起来像但必须交人」
的反例。
@@ -152,72 +152,72 @@ class VerificationSettlementTests(unittest.TestCase):
("javdb", current.replace("〜", "~").replace("!!", "!!")),
("makers", "「いますぐ精子たくさん飲ませて…」フェラテクィーン夢実かなえの"
"ごっくんしまくり逆ナンパ"))
- self.assertKept(key, "adr-0137-no-new-information", asset_id, "title", current)
+ self.assertKept(key, "adr-0139-no-new-information", asset_id, "title", current)
def test_official_masked_title_does_not_replace_the_original_wording(self):
current = "身動き出来ない私は何度も凌辱されー、早漏メイドに改造された 七沢みあ"
asset_id = self.asset("MIDE-633", title=current)
key = self.row("MIDE-633", "title", current,
("makers", "身動き出来ない私は何度も凌●されー、早漏メイドに改造された"))
- self.assertKept(key, "adr-0137-no-new-information", asset_id, "title", current)
+ self.assertKept(key, "adr-0139-no-new-information", asset_id, "title", current)
def test_store_decoration_on_the_candidate_keeps_the_current_title(self):
current = "女優のたまご。ハロウィン前…クンニで切ないアヘ顔に膣中大量射精"
asset_id = self.asset("FC2-PPV-3977699", title=current)
key = self.row("FC2-PPV-3977699", "title", current,
("fc2", "【限定顔出し15000→5000】" + current))
- self.assertKept(key, "adr-0137-no-new-information", asset_id, "title", current)
+ self.assertKept(key, "adr-0139-no-new-information", asset_id, "title", current)
def test_community_only_dissent_keeps_the_current_value(self):
asset_id = self.asset("STH-123", release_date="2025-10-24")
key = self.row("STH-123", "release_date", "2025-10-24", ("javdb", "2025-10-16"))
- self.assertKept(key, "adr-0137-community-dissent", asset_id, "release_date", "2025-10-24")
+ self.assertKept(key, "adr-0139-community-dissent", asset_id, "release_date", "2025-10-24")
def test_official_source_backing_the_current_value_outweighs_another_official(self):
asset_id = self.asset("HUNTC-592", release_date="2026-10-13")
key = self.row("HUNTC-592", "release_date", "2026-10-13",
("dmm", "2026-10-13", False), ("r18dev", "2026-10-09"), ("avbase", "2026-10-09"))
- self.assertKept(key, "adr-0137-official-backs-current", asset_id, "release_date", "2026-10-13")
+ self.assertKept(key, "adr-0139-official-backs-current", asset_id, "release_date", "2026-10-13")
def test_value_written_by_a_higher_ranked_official_source_stays(self):
asset_id = self.asset("ROYD-083", owner=auto_owner("makers"), studio="HHH")
key = self.row("ROYD-083", "studio", "HHH",
("dmm", "ロイヤル", False), ("r18dev", "Royal"), ("javdb", "ROYAL"))
- self.assertKept(key, "adr-0137-chain-keeps-current", asset_id, "studio", "HHH")
+ self.assertKept(key, "adr-0139-chain-keeps-current", asset_id, "studio", "HHH")
def test_r18dev_english_studio_name_is_a_translation_not_a_dissent(self):
asset_id = self.asset("SIMM-876", owner=auto_owner("dmm"), studio="しろうとまんまん")
key = self.row("SIMM-876", "studio", "しろうとまんまん",
("r18dev", "Amateur Pussies"), ("javbus", "DOC"), ("javdb", "DOC"))
- self.assertKept(key, "adr-0137-community-dissent", asset_id, "studio", "しろうとまんまん")
+ self.assertKept(key, "adr-0139-community-dissent", asset_id, "studio", "しろうとまんまん")
def test_studio_with_a_reading_or_parent_note_adds_nothing(self):
asset_id = self.asset("EBOD-531", owner=auto_owner("r18dev"), studio="E-BODY")
key = self.row("EBOD-531", "studio", "E-BODY", ("makers", "E-BODY(イーボディ)"))
- self.assertKept(key, "adr-0137-no-new-information", asset_id, "studio", "E-BODY")
+ self.assertKept(key, "adr-0139-no-new-information", asset_id, "studio", "E-BODY")
def test_user_owned_value_is_never_challenged(self):
asset_id = self.asset("ACC-006", owner=USER_MANUAL, release_date="2016-05-29")
key = self.row("ACC-006", "release_date", "2016-05-29", ("r18dev", "2009-01-08"))
- self.assertKept(key, "adr-0137-user-owned", asset_id, "release_date", "2016-05-29")
+ self.assertKept(key, "adr-0139-user-owned", asset_id, "release_date", "2016-05-29")
def test_tag_candidates_that_are_a_subset_keep_the_current_tags(self):
asset_id = self.asset("DASS-468", tags=("中出内射", "巨乳", "母子设定", "痴女"))
key = self.row("DASS-468", "tags", "中出内射、巨乳、母子设定、痴女",
("javdb", ["痴女", "巨乳", "中出内射"]))
- self.assertEqual(self.outcome(key).rule, "adr-0137-no-new-information")
+ self.assertEqual(self.outcome(key).rule, "adr-0139-no-new-information")
self.assertNotIn(key, self.queue())
self.settle()
self.assertEqual(self.tags(asset_id), {"中出内射", "巨乳", "母子设定", "痴女"})
self.assertEqual(self.decisions(), {})
- def test_row_pinned_to_an_asset_no_longer_in_the_library_is_kept(self):
+ def test_row_pinned_to_an_id_now_holding_another_code_is_kept(self):
"""按文件出的行,那个编号已经是别的片:谁批准都写不进去,不摆给人,也不写。"""
asset_id = self.asset("ABP-602", release_date="2017-08-01")
key = self.row("ABP-601", "release_date", "2017-08-01", ("makers", "2017-08-05"),
pinned=(asset_id, r"B:\云下载\ABP-601A-C.mp4"))
self.asset("ABP-601", release_date="2017-08-01")
- self.assertKept(key, "adr-0137-asset-gone", asset_id, "release_date", "2017-08-01")
+ self.assertKept(key, "adr-0139-asset-gone", asset_id, "release_date", "2017-08-01")
def test_row_pinned_to_a_relocated_file_still_lands_on_the_same_asset(self):
"""扫描按番号改指挪过的文件,编号不变(ADR-0131);候选件里的旧路径不挡落库。"""
@@ -330,7 +330,7 @@ class VerificationSettlementTests(unittest.TestCase):
role="performer", source="javinizer:dmm:performer", now="now")
key = self.row("ACC-006", "performers", "永沢咲良",
("javdb", [{"name": "有栖七菜"}]), ("r18dev", [{"name": "三浦沙綾"}]))
- self.assertForHuman(key, "adr-0137-official-performers")
+ self.assertForHuman(key, "adr-0139-official-performers")
def test_maker_and_label_mixed_in_the_studio_field_go_to_a_human(self):
self.asset("HOISW-002", owner=auto_owner("r18dev"), studio="素人ホイホイsweet!")
@@ -338,25 +338,25 @@ class VerificationSettlementTests(unittest.TestCase):
("javdb", "素人ホイホイsweet!/妄想族"), ("r18dev", "Fresh Gordon/Daydream Tribe"),
("dmm", "フレッシュ・ゴードン/妄想族"), ("avbase", "フレッシュ・ゴードン/妄想族"),
("javbus", "素人ホイホイsweet!/妄想族"))
- self.assertForHuman(key, "adr-0137-official-entity")
+ self.assertForHuman(key, "adr-0139-official-entity")
def test_official_sources_naming_different_dates_go_to_a_human(self):
self.asset("SSIS-776", release_date="2023-01-20")
key = self.row("SSIS-776", "release_date", "2023-01-20",
("dmm", "2023-01-24"), ("r18dev", "2023-01-27"))
- self.assertForHuman(key, "adr-0137-official-disagree")
+ self.assertForHuman(key, "adr-0139-official-disagree")
def test_a_local_nfo_disagreeing_with_the_ledger_goes_to_a_human(self):
self.asset("FSDSS-275", title="腰が砕けても逃がさない!")
key = self.row("FSDSS-275", "title", "腰が砕けても逃がさない!",
("local_nfo", "ひたすら膣奥を貫く強制立ちバックハンドル"))
- self.assertForHuman(key, "adr-0137-nfo-dissent")
+ self.assertForHuman(key, "adr-0139-nfo-dissent")
def test_official_masked_studio_in_unknown_series_still_needs_a_human(self):
self.asset("CAWD-241", owner=auto_owner("r18dev"), series="社内研修相部屋NTR")
key = self.row("CAWD-241", "series", "社内研修相部屋NTR",
("makers", "童貞陰キャ男とプライド高い絶倫彼女"))
- self.assertForHuman(key, "adr-0137-official-entity")
+ self.assertForHuman(key, "adr-0139-official-entity")
if __name__ == "__main__":
diff --git a/tests/test_upgrade_repairs.py b/tests/test_upgrade_repairs.py
index 013762ced..27b3827c8 100644
--- a/tests/test_upgrade_repairs.py
+++ b/tests/test_upgrade_repairs.py
@@ -329,7 +329,7 @@ class UpgradeRepairTests(unittest.TestCase):
self.assertFalse(self.service.receipt.exists())
def test_verification_rows_already_on_disk_settle_once_in_the_background(self):
- """升级前落盘的核查候选(ADR-0137)在后台结算一次,官方一致的日期写入,备份先行;
+ """升级前落盘的核查候选(ADR-0139)在后台结算一次,官方一致的日期写入,备份先行;
启动前的 `prepare` 不等它。"""
import csv
with self.database.write_transaction() as connection:
diff --git a/tests/test_web_review.py b/tests/test_web_review.py
index 01ec08c24..5dd6849d0 100644
--- a/tests/test_web_review.py
+++ b/tests/test_web_review.py
@@ -2230,7 +2230,7 @@ class ReviewQueueTests(unittest.TestCase):
self.assertEqual(self.queue_keys("metadata_fields"), [])
def test_community_verification_dissent_leaves_every_owner_alone_and_off_the_queue(self):
- """核查带回的社区异议只补空不挑战(ADR-0033、ADR-0137),现值归谁都不进队列、不写。"""
+ """核查带回的社区异议只补空不挑战(ADR-0033、ADR-0139),现值归谁都不进队列、不写。"""
cases = (("OWN-001", USER_MANUAL), ("OWN-002", review_owner("javdb")),
("OWN-003", auto_owner("avbase")))
keys = []