Merge branch 'deai2'
Co-Authored-By: Claude Fable 5.1 <[email protected]> # Conflicts: # apps/server/src/modules/acquisition-organize/services/organize.ts # apps/web/app/routes/console/sites.$siteId.tsx
This commit is contained in:
commit
12bc4664b6
247 files changed
+2658
-2148
No files matched your search
@@ -26,7 +26,7 @@ import {
|
||||
presetConditions,
|
||||
} from "../../src/modules/acquisition-organize/services/subscriptions-params.ts";
|
||||
|
||||
// C1-A 订阅遗留收尾:包含 / 排除 → 订阅私有规则组(评估链纳入、随订阅删除)、MP 分辨率 / 来源 / 特效 → 版本目标、
|
||||
// C1-A 订阅遗留收尾:包含 / 排除 → 订阅私有规则组(评估链纳入、随订阅删除)、MP 分辨率 / 来源 / 特效 → 收录版本、
|
||||
// 保存路径经路径映射传给 qB、库根用于首次整理、下载器实例、重置进度、日历。
|
||||
|
||||
const hasPg = await pgAvailable();
|
||||
@@ -182,7 +182,7 @@ describe.skipIf(!hasPg)("C1-A 订阅遗留收尾(真实 PG + mock qB)", () => {
|
||||
expect(again[0]!.hard).toEqual({ exclude: ["CAM"] });
|
||||
});
|
||||
|
||||
it("评估链纳入私有组:包含没命中 / 排除命中都拒绝;命中包含建计划;与版本目标自己的包含取 AND", async () => {
|
||||
it("评估链纳入私有组:包含没命中 / 排除命中都拒绝;命中包含建计划;与收录版本自己的包含取 AND", async () => {
|
||||
const e = await seedEntity(db(), { kind: "movie", title: "Filter Film", year: 2024 });
|
||||
const c = await h.api("POST", "/subscriptions", {
|
||||
mediaEntityId: e,
|
||||
@@ -207,7 +207,7 @@ describe.skipIf(!hasPg)("C1-A 订阅遗留收尾(真实 PG + mock qB)", () => {
|
||||
const ok = await release(e, "Filter.Film.2024.1080p.WEB-DL.CHS.x264-GRP");
|
||||
const r3 = await evaluateAcquisition(h.d, { sourceReleaseId: ok });
|
||||
expect(r3.plans, JSON.stringify(r3)).toHaveLength(1);
|
||||
// 版本目标自己也要求 "GRP2":与私有组的 CHS 取 AND
|
||||
// 收录版本自己也要求 "GRP2":与私有组的 CHS 取 AND
|
||||
await db().updateTable("acquisition_plan").set({ status: "cancelled" }).where("id", "=", r3.plans[0]!).execute();
|
||||
await db()
|
||||
.updateTable("acquisition_slot")
|
||||
@@ -223,7 +223,7 @@ describe.skipIf(!hasPg)("C1-A 订阅遗留收尾(真实 PG + mock qB)", () => {
|
||||
expect((await evaluateAcquisition(h.d, { sourceReleaseId: both })).plans).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("MP 分辨率 / 来源 / 特效:新建时建默认版本目标承载预设;改预设覆盖同一字段,手改过的字段保留;无法识别 400", async () => {
|
||||
it("MP 分辨率 / 来源 / 特效:新建时建默认收录版本承载预设;改预设覆盖同一字段,手改过的字段保留;无法识别 400", async () => {
|
||||
const e = await seedEntity(db(), { kind: "series", title: "预设剧", year: 2025 });
|
||||
const bad = await h.api("POST", "/subscriptions", {
|
||||
mediaEntityId: e,
|
||||
@@ -461,7 +461,7 @@ describe.skipIf(!hasPg)("C1-A 订阅遗留收尾(真实 PG + mock qB)", () => {
|
||||
});
|
||||
expect(c.status, JSON.stringify(c.body)).toBe(201);
|
||||
const subId = c.body.data.id as string;
|
||||
// E01 已入库(单版本目标:作品下资产都算)
|
||||
// E01 已入库(单收录版本:作品下资产都算)
|
||||
const a = await db()
|
||||
.insertInto("media_asset")
|
||||
.values({
|
||||
|
||||
@@ -264,7 +264,7 @@ describe.skipIf(!hasPg)("订阅重做(真实 PG)", () => {
|
||||
expect((await h.api("GET", "/subscriptions/00000000-0000-0000-0000-000000000000/coverage")).status).toBe(404);
|
||||
});
|
||||
|
||||
it("覆盖矩阵:集范围裁剪;总集数未知列到已见最高集并标 suspected;电影按内容版本 × 版本目标", async () => {
|
||||
it("覆盖矩阵:集范围裁剪;总集数未知列到已见最高集并标 suspected;电影按内容版本 × 收录版本", async () => {
|
||||
const e = await seedEntity(db(), { kind: "series", title: "范围剧", year: 2025 });
|
||||
await season(e, 1, null);
|
||||
const e3 = await episode(e, 1, 3);
|
||||
@@ -325,7 +325,7 @@ describe.skipIf(!hasPg)("订阅重做(真实 PG)", () => {
|
||||
// 暂停
|
||||
const e4 = await seedEntity(db(), { kind: "series", title: `${tag}丁`, year: 2022 });
|
||||
const s4 = await sub(e4, { status: "paused" });
|
||||
// 已完成(电影:唯一版本目标已入库)
|
||||
// 已完成(电影:唯一收录版本已入库)
|
||||
const e5 = await seedEntity(db(), { kind: "movie", title: `${tag}戊`, year: 2021 });
|
||||
const a5 = await asset(e5);
|
||||
const s5 = await sub(e5, { kind: "movie", mode: "once" });
|
||||
@@ -584,7 +584,7 @@ describe.skipIf(!hasPg)("订阅重做(真实 PG)", () => {
|
||||
expect(r.status, JSON.stringify(bad)).toBe(400);
|
||||
}
|
||||
|
||||
// PATCH:autoFill 布尔 → on/off;best_version → 版本目标升级策略
|
||||
// PATCH:autoFill 布尔 → on/off;best_version → 收录版本升级策略
|
||||
const sid = c.body.data.id;
|
||||
const sl = await slot(e, sid, "main");
|
||||
const u = await h.api("PATCH", `/subscriptions/${sid}`, {
|
||||
@@ -611,7 +611,7 @@ describe.skipIf(!hasPg)("订阅重做(真实 PG)", () => {
|
||||
).toEqual({ enabled: false, mode: "full_pack" });
|
||||
});
|
||||
|
||||
it("暂停 / 恢复 / 重新订阅 / 批量 / 版本目标排序", async () => {
|
||||
it("暂停 / 恢复 / 重新订阅 / 批量 / 收录版本排序", async () => {
|
||||
const e = await seedEntity(db(), { kind: "movie", title: "动作片", year: 2024 });
|
||||
const s = await sub(e, { kind: "movie", mode: "once" });
|
||||
const a = await slot(e, s, "A", { position: 0 });
|
||||
|
||||
Reference in new issue
Block a user