pixivflow 3.4.3 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -148,6 +148,7 @@ class DeliveryService {
148
148
  pixivId: artifact.pixivId,
149
149
  type: artifact.type,
150
150
  title: artifact.title,
151
+ ...(artifact.seriesTitle !== undefined ? { seriesTitle: artifact.seriesTitle } : {}),
151
152
  ...(artifact.spoiler !== undefined ? { spoiler: artifact.spoiler } : {}),
152
153
  },
153
154
  files,
@@ -288,6 +289,7 @@ class DeliveryService {
288
289
  return {
289
290
  deliveryTarget,
290
291
  title: artifact.title,
292
+ ...(artifact.seriesTitle !== undefined ? { seriesTitle: artifact.seriesTitle } : {}),
291
293
  pixivId: artifact.pixivId,
292
294
  type: artifact.type,
293
295
  targetId: target.id,
@@ -425,8 +425,21 @@ function buildTemplateVariables(request) {
425
425
  return 'R18G';
426
426
  return `XRestrict${xRestrict}`;
427
427
  })();
428
+ // A series novel's `seriesTitle` names its parent series while `title` is the
429
+ // chapter title. Compose the card headline `《系列名》 章节名` when the work
430
+ // belongs to a series; fall back to the bare title otherwise (illustrations
431
+ // and non-series novels never carry a seriesTitle).
432
+ const displayTitle = c.type === 'novel' && c.seriesTitle
433
+ ? `《${c.seriesTitle}》 ${c.title}`
434
+ : c.title;
428
435
  return {
429
436
  title: c.title,
437
+ // Composed card headline: `《系列名》 章节名` for series novels, else the
438
+ // bare work title. Templates should render {{displayTitle}}.
439
+ displayTitle,
440
+ // Parent series name for a series novel chapter; empty otherwise. Tempo
441
+ // templates can render `《{{seriesTitle}}》 {{title}}` themselves.
442
+ seriesTitle: c.seriesTitle ?? '',
430
443
  pixivId: c.pixivId,
431
444
  type: c.type,
432
445
  targetId: c.targetId ?? '',
@@ -14,6 +14,12 @@ export interface DownloadedArtifact {
14
14
  pixivId: string;
15
15
  type: DeliveryItemType;
16
16
  title: string;
17
+ /**
18
+ * Parent series name for a series-novel chapter, when the API response
19
+ * carried one. This is distinct from `title`, which holds the chapter title
20
+ * only. Empty when the work is not part of a Pixiv series.
21
+ */
22
+ seriesTitle?: string;
17
23
  /**
18
24
  * Pixiv author (artist) display name, when the API response carried one.
19
25
  *
@@ -57,6 +63,13 @@ export interface DownloadedArtifact {
57
63
  export declare function deliveryFilePaths(artifact: DownloadedArtifact): string[];
58
64
  export interface DeliveryContext {
59
65
  title: string;
66
+ /**
67
+ * Series (series novel) name, when the work belongs to a Pixiv series.
68
+ * A series novel's `title` holds the chapter title only; this carries the
69
+ * parent series name so templates can render e.g. `《系列名》 章节名`.
70
+ * Empty when the work is not part of a series.
71
+ */
72
+ seriesTitle?: string;
60
73
  pixivId: string;
61
74
  type: DeliveryItemType;
62
75
  /**
@@ -386,6 +386,7 @@ class NovelDownloader {
386
386
  pixivId: workId,
387
387
  type: 'novel',
388
388
  title: detail.title,
389
+ seriesTitle: detail.series?.title || undefined,
389
390
  // Attribution travels with the artifact: a publishing provider (e.g. the
390
391
  // TelePost submission target) renders it into its own fields, so the
391
392
  // downloader must not be the only place that knows the author.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "pixivflow",
4
- "version": "3.4.3",
4
+ "version": "3.5.0",
5
5
  "private": true
6
6
  }
package/dist/version.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BUILD = void 0;
4
4
  // GENERATED by scripts/write-version.js — do not edit manually.
5
- exports.BUILD = { version: '3.4.3', commit: '74ffa4d29ec2' };
5
+ exports.BUILD = { version: '3.5.0', commit: '644b3dfb5551' };
6
6
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "pixivflow-webui-backend",
4
- "version": "3.4.3",
4
+ "version": "3.5.0",
5
5
  "description": "PixivFlow WebUI Backend - CommonJS module"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixivflow",
3
- "version": "3.4.3",
3
+ "version": "3.5.0",
4
4
  "description": "🎨 Pixiv 下载、筛选与自动收集工具 - 批量下载插画和小说、按标签/热度/日期筛选、定时任务与可靠 HTTP 交付 | Pixiv downloader and automation toolkit with filtering, scheduling and reliable HTTP delivery",
5
5
  "repository": {
6
6
  "type": "git",