Add fields for video episode details and tags for shows

Updates `client/src/pages/admin.tsx` to include inputs for `filename`, `episodeNumber`, `episodeTitle`, and `tags`. Modifies `server/storage.ts` to include these fields in `MemStorage` and `shared/schema.ts` to add these columns to the `videos` table in PostgreSQL.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 170e18f0-0f13-4eca-8643-546bba1dd8cc
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/170e18f0-0f13-4eca-8643-546bba1dd8cc/ik6JrhN
This commit is contained in:
sebastjanartic 2025-09-02 13:31:12 +00:00
parent e117f3617b
commit f17747a814
3 changed files with 62 additions and 0 deletions

View File

@ -214,6 +214,10 @@ function EditVideoDialog({
title: video.title, title: video.title,
artist: video.artist || "", artist: video.artist || "",
description: video.description, description: video.description,
filename: video.filename || "",
episodeNumber: video.episodeNumber || "",
episodeTitle: video.episodeTitle || "",
tags: video.tags || [],
contentType: video.contentType, contentType: video.contentType,
genre: video.genre, genre: video.genre,
customThumbnailUrl: video.customThumbnailUrl || "", customThumbnailUrl: video.customThumbnailUrl || "",
@ -225,6 +229,10 @@ function EditVideoDialog({
title: video.title, title: video.title,
artist: video.artist || "", artist: video.artist || "",
description: video.description, description: video.description,
filename: video.filename || "",
episodeNumber: video.episodeNumber || "",
episodeTitle: video.episodeTitle || "",
tags: video.tags || [],
contentType: video.contentType, contentType: video.contentType,
genre: video.genre, genre: video.genre,
customThumbnailUrl: video.customThumbnailUrl || "", customThumbnailUrl: video.customThumbnailUrl || "",
@ -353,6 +361,51 @@ function EditVideoDialog({
/> />
</div> </div>
<div>
<Label className="text-white/90">File Name (from Bunny.net)</Label>
<Input
value={formData.filename}
onChange={(e) => setFormData({ ...formData, filename: e.target.value })}
className="bg-white/10 border-white/20 text-white"
placeholder="Original filename..."
/>
</div>
<div>
<Label className="text-white/90">Episode Number (for shows)</Label>
<Input
type="number"
value={formData.episodeNumber}
onChange={(e) => setFormData({ ...formData, episodeNumber: e.target.value })}
className="bg-white/10 border-white/20 text-white"
placeholder="e.g., 15"
/>
</div>
<div>
<Label className="text-white/90">Episode Title (for shows)</Label>
<Input
value={formData.episodeTitle}
onChange={(e) => setFormData({ ...formData, episodeTitle: e.target.value })}
className="bg-white/10 border-white/20 text-white"
placeholder="e.g., Folx Stadl Special"
/>
</div>
<div className="md:col-span-2">
<Label className="text-white/90">Tags/Hashtags</Label>
<Input
value={Array.isArray(formData.tags) ? formData.tags.join(', ') : ''}
onChange={(e) => {
const tagString = e.target.value;
const tagsArray = tagString.split(',').map(tag => tag.trim()).filter(tag => tag.length > 0);
setFormData({ ...formData, tags: tagsArray });
}}
className="bg-white/10 border-white/20 text-white mb-4"
placeholder="Enter tags separated by commas (e.g., volksmusik, austria, live)"
/>
</div>
<div className="md:col-span-2"> <div className="md:col-span-2">
<div className="flex items-center justify-between mb-2"> <div className="flex items-center justify-between mb-2">
<Label className="text-white/90">Description</Label> <Label className="text-white/90">Description</Label>

View File

@ -436,6 +436,9 @@ export class MemStorage implements IStorage {
description: video.description || "", description: video.description || "",
category: video.category || "", category: video.category || "",
artist: null, // Add artist field artist: null, // Add artist field
filename: null, // Original filename
episodeNumber: null, // Episode number for shows
episodeTitle: null, // Episode title for shows
customThumbnailUrl: null, customThumbnailUrl: null,
faceCenterPosition: null, faceCenterPosition: null,
facesDetected: 0, facesDetected: 0,
@ -493,6 +496,9 @@ export class MemStorage implements IStorage {
description: video.description || "", description: video.description || "",
category: video.category || "", category: video.category || "",
artist: video.artist || null, // Add artist field artist: video.artist || null, // Add artist field
filename: video.filename || null,
episodeNumber: video.episodeNumber || null,
episodeTitle: video.episodeTitle || null,
customThumbnailUrl: null, customThumbnailUrl: null,
faceCenterPosition: null, faceCenterPosition: null,
facesDetected: 0, facesDetected: 0,

View File

@ -12,6 +12,9 @@ export const videos = pgTable("videos", {
title: text("title").notNull(), title: text("title").notNull(),
artist: text("artist"), // Izvajalec/Artist name artist: text("artist"), // Izvajalec/Artist name
description: text("description").default("").notNull(), description: text("description").default("").notNull(),
filename: text("filename"), // Original file name from Bunny.net
episodeNumber: integer("episode_number"), // For shows like "Folx Stadl"
episodeTitle: text("episode_title"), // Episode title for shows
thumbnailUrl: text("thumbnail_url").notNull(), thumbnailUrl: text("thumbnail_url").notNull(),
customThumbnailUrl: text("custom_thumbnail_url"), customThumbnailUrl: text("custom_thumbnail_url"),
faceCenterPosition: text("face_center_position"), // CSS object-position for face centering faceCenterPosition: text("face_center_position"), // CSS object-position for face centering