Add TV bumpers functionality: introduce configuration options for bumpers in .env.example and appsettings.json, enhance ChannelEndpoints to manage jingles and bumper assets, and update Channel and ScheduleEntry models to support bumper logic. Implement validation for bumper settings and integrate bumper handling in scheduling logic.
This commit is contained in:
@@ -73,6 +73,17 @@ export function ShowDetail({ showId }: { showId: string }) {
|
||||
|
||||
const selected = candidates.filter((c) => !deselected.has(c.asset.id))
|
||||
|
||||
// Сколько разных сезонов загружено — по распознанным SxxExx в именах серий.
|
||||
const seasonCount = useMemo(() => {
|
||||
if (!show) return 0
|
||||
const seasons = new Set<number>()
|
||||
for (const e of show.episodes) {
|
||||
const se = parseEpisode(e.assetName ?? '')
|
||||
if (se) seasons.add(se.season)
|
||||
}
|
||||
return seasons.size
|
||||
}, [show])
|
||||
|
||||
if (isLoading || !show) return <p className="text-muted-foreground">{t('common.loading')}</p>
|
||||
|
||||
const isSingle = show.kind === 'Single'
|
||||
@@ -115,9 +126,17 @@ export function ShowDetail({ showId }: { showId: string }) {
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
<h2 className="crt-glow text-xl font-semibold">{show.name}</h2>
|
||||
<Badge variant="muted">{t(`admin.shows.kinds.${show.kind}`)}</Badge>
|
||||
{show.kind === 'Series' && (
|
||||
<Badge variant="muted">
|
||||
{t('admin.shows.seasons')}: {seasonCount}
|
||||
</Badge>
|
||||
)}
|
||||
<Badge variant="muted">
|
||||
{t('admin.shows.episodes')}: {show.episodes.length}
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
{canAdd && (
|
||||
|
||||
Reference in New Issue
Block a user