feat: multi-style support in covers.js and postImages.js

covers.js: image_style CSV → random pick per generation
postImages.js: image_style CSV → random pick per generation
This commit is contained in:
Ник (Claude)
2026-06-10 15:50:49 +03:00
parent b4c537487d
commit 80d1885feb
2 changed files with 11 additions and 2 deletions
+6 -1
View File
@@ -100,7 +100,12 @@ Wide 16:9 format. No text, no letters, no logos, no identifiable real human face
let styleDesc, paletteDesc, moodDesc, compositionDesc;
const csStyle = channelStyle?.image_style;
// Если задано несколько стилей через запятую — берём случайный из них
const rawStyle = channelStyle?.image_style || '';
const styleList = rawStyle.split(',').map(s => s.trim()).filter(s => s && s !== 'auto');
const csStyle = styleList.length > 0
? styleList[Math.floor(Math.random() * styleList.length)]
: null;
const STYLE_MAP = {
'realistic-photo': { style: 'photorealistic, high-quality photography, natural lighting, sharp focus, realistic textures', mood: 'professional, realistic', comp: 'rule of thirds, natural depth of field' },
'flat-illustration': { style: 'flat vector illustration, clean geometric shapes, modern editorial style, smooth gradients, minimal', mood: 'clean, modern', comp: 'balanced, centered focal point' },