export function sourceResponse(baseUrl, searchParams) { const episodes = `第1集$${baseUrl}/test.mp4#第2集$${baseUrl}/hls/master.m3u8`; const id = searchParams.get('ids') || 'fixture-video-1'; const query = searchParams.get('wd') || '验证视频'; return { code: 1, msg: 'ok', page: 1, pagecount: 1, total: 3, list: [1, 2, 3].map((number) => ({ vod_id: number === 1 ? id : `fixture-video-${number}`, vod_name: `${query} ${number}`, vod_pic: `${baseUrl}/poster.svg?item=${number}`, vod_remarks: number === 1 ? '全2集' : '测试内容', vod_year: '2026', vod_area: 'Fixture', vod_actor: 'Automated Validator', vod_director: 'KVideo Verification', vod_content: 'Deterministic content used only by the local verification suite.', type_name: '测试', vod_play_from: 'm3u8', vod_play_url: episodes, })), }; } export function posterSvg(item = '1') { const safe = String(item).replace(/[^0-9A-Za-z_-]/g, ''); return `KVideo ${safe}`; }