Refactor Channel endpoints and data models: replace jingle functionality with bumper templates, update related commands and handlers, and enhance API routes for managing bumper templates. Remove obsolete jingle-related code and adjust channel data structures to support new bumper template features.
This commit is contained in:
@@ -117,22 +117,30 @@ export type AdInsertion = 'BetweenBlocks' | 'BetweenEpisodes'
|
||||
export type OverrideMode = 'Exclusive' | 'Boost'
|
||||
export type ScheduleEntryKind = 'Program' | 'Ad' | 'Bumper'
|
||||
export type BumperFont = 'Sans' | 'Serif'
|
||||
export type BumperMode = 'Dynamic' | 'Static' | 'Both'
|
||||
export type BumperSelection = 'Rotation' | 'Random' | 'AlwaysFirst'
|
||||
|
||||
/** Общие для канала настройки заставок (стиль/звук — на каждом блоке, см. BumperTemplateDto). */
|
||||
export type BumperSettings = {
|
||||
mode: BumperMode
|
||||
durationSeconds: number
|
||||
backgroundColor: string
|
||||
backgroundColor2: string
|
||||
accentColor: string
|
||||
textColor: string
|
||||
font: BumperFont
|
||||
nowLabel: string
|
||||
nextLabel: string
|
||||
minIntervalMinutes: number
|
||||
onlyBetweenDifferentShows: boolean
|
||||
selection: BumperSelection
|
||||
}
|
||||
|
||||
export type BumperTemplateDto = {
|
||||
id: string
|
||||
position: number
|
||||
isDefault: boolean
|
||||
name: string
|
||||
backgroundColor: string
|
||||
backgroundColor2: string
|
||||
accentColor: string
|
||||
textColor: string
|
||||
hasBackground: boolean
|
||||
hasMusic: boolean
|
||||
hasAudio: boolean
|
||||
audioDurationSeconds: number | null
|
||||
}
|
||||
|
||||
export type ChannelSummaryDto = {
|
||||
@@ -160,13 +168,6 @@ export type ChannelAdDto = {
|
||||
position: number
|
||||
}
|
||||
|
||||
export type ChannelJingleDto = {
|
||||
id: string
|
||||
mediaAssetId: string
|
||||
assetName: string | null
|
||||
position: number
|
||||
}
|
||||
|
||||
export type OverrideShowDto = { showId: string; showName: string; weight: number }
|
||||
|
||||
export type ProgrammingOverrideDto = {
|
||||
@@ -186,10 +187,10 @@ export type ChannelDto = {
|
||||
adsPerBreak: number
|
||||
bumpersEnabled: boolean
|
||||
bumper: BumperSettings
|
||||
bumperTemplates: BumperTemplateDto[]
|
||||
fillerAssetId: string | null
|
||||
shows: ChannelShowDto[]
|
||||
ads: ChannelAdDto[]
|
||||
jingles: ChannelJingleDto[]
|
||||
overrides: ProgrammingOverrideDto[]
|
||||
}
|
||||
|
||||
|
||||
@@ -183,10 +183,13 @@ const resources = {
|
||||
betweenBlocks: 'Между блоками',
|
||||
betweenEpisodes: 'Между сериями',
|
||||
adsPerBreak: 'Роликов подряд',
|
||||
bumpersLabel: 'ТВ-заставки на переходах',
|
||||
bumpers: 'ТВ-заставки',
|
||||
bumpersLabel: 'Заставки на переходах',
|
||||
bumpersHint: 'Короткая заставка «Сейчас / Далее» между разными шоу',
|
||||
bumperStyle: 'Оформление заставки',
|
||||
bumperDuration: 'Длительность, с',
|
||||
bumperSelection: 'Выбор блока',
|
||||
bumperSelectionRotation: 'По кругу',
|
||||
bumperSelectionRandom: 'Случайно',
|
||||
bumperSelectionAlwaysFirst: 'Всегда первый',
|
||||
bumperMinInterval: 'Мин. интервал, мин',
|
||||
bumperFont: 'Шрифт',
|
||||
bumperFontSans: 'Гротеск',
|
||||
@@ -198,22 +201,25 @@ const resources = {
|
||||
bumperAccent: 'Акцент',
|
||||
bumperText: 'Текст',
|
||||
bumperOnlyDifferent: 'Только на смене шоу (не внутри марафона)',
|
||||
bumperMode: 'Режим заставок',
|
||||
bumperModeDynamic: 'Динамические «Сейчас/Далее»',
|
||||
bumperModeStatic: 'Только джинглы',
|
||||
bumperModeBoth: 'Чередовать',
|
||||
bumperBackground: 'Фон',
|
||||
bumperBackgroundHint: 'Картинка или видео-петля; иначе — анимированный градиент',
|
||||
bumperMusic: 'Музыка',
|
||||
bumperMusicHint: 'Аудиофайл-подложка; иначе — синтезированный джингл',
|
||||
bumperTemplates: 'Блоки заставок',
|
||||
bumperTemplatesHint:
|
||||
'Каждый блок — свой звук и оформление. Первый блок дефолтный, его нельзя удалить. Длительность заставки — по длине звука.',
|
||||
bumperAddTemplate: 'Добавить блок',
|
||||
bumperTemplateName: 'Название',
|
||||
bumperDefault: 'по умолчанию',
|
||||
bumperSeconds: 'с',
|
||||
bumperDefaultDuration: '≈8 с (джингл)',
|
||||
bumperAudio: 'Звук',
|
||||
bumperAudioHint: 'Звук заставки; иначе — синтезированный джингл',
|
||||
bumperPreview: 'Отрендерить пример',
|
||||
bumperPreviewRendering: 'Рендерим…',
|
||||
bumperPreviewHint: 'Пример со звуком и анимацией (примерные названия шоу). Использует сохранённые настройки.',
|
||||
bumperBackground: 'Фон-картинка',
|
||||
bumperBackgroundHint: 'Картинка фона; иначе — постер шоу или градиент',
|
||||
bumperFileLoaded: 'загружено',
|
||||
bumperFileDefault: 'по умолчанию',
|
||||
bumperUpload: 'Загрузить',
|
||||
bumperReset: 'Сбросить',
|
||||
jingles: 'Джинглы-отбивки',
|
||||
jinglesHint: 'Готовые ролики для статичных заставок; крутятся по кругу на переходах (режимы «Только джинглы» и «Чередовать»).',
|
||||
pickJingle: 'Выберите ролик',
|
||||
noJingles: 'Пул джинглов пуст',
|
||||
filler: 'Заглушка',
|
||||
noFiller: 'Без заглушки',
|
||||
shows: 'Шоу канала',
|
||||
@@ -462,10 +468,13 @@ const resources = {
|
||||
betweenBlocks: 'Between blocks',
|
||||
betweenEpisodes: 'Between episodes',
|
||||
adsPerBreak: 'Ads per break',
|
||||
bumpers: 'TV bumpers',
|
||||
bumpersLabel: 'Transition bumpers',
|
||||
bumpersHint: 'Short “Now / Next” bumper between different shows',
|
||||
bumperStyle: 'Bumper style',
|
||||
bumperDuration: 'Duration, s',
|
||||
bumperSelection: 'Block selection',
|
||||
bumperSelectionRotation: 'Rotation',
|
||||
bumperSelectionRandom: 'Random',
|
||||
bumperSelectionAlwaysFirst: 'Always first',
|
||||
bumperMinInterval: 'Min interval, min',
|
||||
bumperFont: 'Font',
|
||||
bumperFontSans: 'Sans',
|
||||
@@ -477,22 +486,25 @@ const resources = {
|
||||
bumperAccent: 'Accent',
|
||||
bumperText: 'Text',
|
||||
bumperOnlyDifferent: 'Only on show change (not within a marathon)',
|
||||
bumperMode: 'Bumper mode',
|
||||
bumperModeDynamic: 'Dynamic “Now / Next”',
|
||||
bumperModeStatic: 'Jingles only',
|
||||
bumperModeBoth: 'Alternate',
|
||||
bumperBackground: 'Background',
|
||||
bumperBackgroundHint: 'Image or video loop; otherwise an animated gradient',
|
||||
bumperMusic: 'Music',
|
||||
bumperMusicHint: 'Audio bed file; otherwise a synthesized jingle',
|
||||
bumperTemplates: 'Bumper blocks',
|
||||
bumperTemplatesHint:
|
||||
'Each block has its own sound and style. The first block is the default and cannot be removed. Bumper length follows the sound length.',
|
||||
bumperAddTemplate: 'Add block',
|
||||
bumperTemplateName: 'Name',
|
||||
bumperDefault: 'default',
|
||||
bumperSeconds: 's',
|
||||
bumperDefaultDuration: '≈8 s (jingle)',
|
||||
bumperAudio: 'Sound',
|
||||
bumperAudioHint: 'Bumper sound; otherwise a synthesized jingle',
|
||||
bumperPreview: 'Render sample',
|
||||
bumperPreviewRendering: 'Rendering…',
|
||||
bumperPreviewHint: 'Sample with sound and animation (example show names). Uses saved settings.',
|
||||
bumperBackground: 'Background image',
|
||||
bumperBackgroundHint: 'Background image; otherwise the show poster or a gradient',
|
||||
bumperFileLoaded: 'loaded',
|
||||
bumperFileDefault: 'default',
|
||||
bumperUpload: 'Upload',
|
||||
bumperReset: 'Reset',
|
||||
jingles: 'Jingles',
|
||||
jinglesHint: 'Pre-made clips for static bumpers; rotated on transitions (in “Jingles only” and “Alternate” modes).',
|
||||
pickJingle: 'Pick a clip',
|
||||
noJingles: 'Jingle pool is empty',
|
||||
filler: 'Filler',
|
||||
noFiller: 'No filler',
|
||||
shows: 'Channel shows',
|
||||
|
||||
Reference in New Issue
Block a user