chore(content): apply v2 artist adjustments
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m49s

- 021 (温景然) enName RYAN → KINGSTON
  (fixes duplicate: 006 stays RYAN, 021 was a typo)
- 002/003/005/012/014/019/025 now use portraits/{no}-cover.webp
  for the cover (chosen from v2 atmospheres per 调整.xlsx). Gallery
  remains {no}/{no}-2/{no}-3 as before.
- 036 third atmosphere image is now expected (v2 provides it),
  removed MISSING_ATMOSPHERE_3 set.
- tosUrl now appends ?v=2 cache-buster so overwritten TOS files
  refresh immediately instead of waiting on CDN/browser cache.

Note: this commit is paired with TOS uploads (handled separately).
This commit is contained in:
iye 2026-05-15 15:56:13 +08:00
parent 7168e50a6e
commit 49be38ff77
3 changed files with 31 additions and 12 deletions

View File

@ -324,7 +324,7 @@ export const ARTIST_SEEDS: ArtistSeed[] = [
{
no: `021`,
name: `温景然`,
enName: `RYAN`,
enName: `KINGSTON`,
age: 27,
gender: `M`,
height: 178,

View File

@ -14,19 +14,29 @@ import { tosUrl } from "./tos";
/** 没有 solo.mp4 的艺人编号docx 标注"缺视频" */
const MISSING_VIDEO: ReadonlySet<string> = new Set(["003", "010", "017", "027"]);
/** 缺氛围图3 的艺人编号资料文件夹里实际只到氛围图2 */
const MISSING_ATMOSPHERE_3: ReadonlySet<string> = new Set(["036"]);
/**
* 自定义封面:这些艺人的卡片/ cover ,
* 11/2/3
* (.xlsx "封面图用氛围图N" webp
* portraits/{no}-cover.webp, portrait )
*/
const CUSTOM_COVERS: ReadonlySet<string> = new Set([
"002",
"003",
"005",
"012",
"014",
"019",
"025",
]);
/** 画廊 = 三张氛围图1/2/3。不包含三视图因为长宽比与卡片不一致。 */
function buildGallery(no: string): string[] {
const items = [
return [
tosUrl(`portraits/${no}.webp`),
tosUrl(`portraits/${no}-2.webp`),
tosUrl(`portraits/${no}-3.webp`),
];
if (!MISSING_ATMOSPHERE_3.has(no)) {
items.push(tosUrl(`portraits/${no}-3.webp`));
}
return items;
}
function buildArtists(): Artist[] {
@ -39,7 +49,11 @@ function buildArtists(): Artist[] {
age: seed.age,
gender: seed.gender,
bio: seed.bio,
portrait: tosUrl(`portraits/${seed.no}.webp`),
portrait: tosUrl(
CUSTOM_COVERS.has(seed.no)
? `portraits/${seed.no}-cover.webp`
: `portraits/${seed.no}.webp`,
),
avatar: "",
gallery: buildGallery(seed.no),
videoUrl: MISSING_VIDEO.has(seed.no)

View File

@ -3,16 +3,21 @@
*
* :
* tosUrl("portraits/001.webp")
* https://cyberstar.tos-cn-shanghai.volces.com/cyber-star/portraits/001.webp
* https://cyberstar.tos-cn-shanghai.volces.com/cyber-star/portraits/001.webp?v=2
*
* NEXT_PUBLIC_TOS_DOMAIN :
* .env.local / .env.production + ( scheme, /)
* fallback (/path/...), public/
*
* TOS_VERSION:每次有 TOS (/),
* +1 CDN URL ,
* , TTL invalidate
*/
const TOS_BASE = (process.env.NEXT_PUBLIC_TOS_DOMAIN ?? "").replace(/\/+$/, "");
const TOS_VERSION = "2";
export function tosUrl(path: string): string {
const clean = path.replace(/^\/+/, "");
if (!TOS_BASE) return `/${clean}`;
return `${TOS_BASE}/${clean}`;
const base = TOS_BASE ? `${TOS_BASE}/${clean}` : `/${clean}`;
return `${base}?v=${TOS_VERSION}`;
}