From f17747a814c358ab43cb75d97c016ff54a67156c Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Tue, 2 Sep 2025 13:31:12 +0000 Subject: [PATCH] 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 --- client/src/pages/admin.tsx | 53 ++++++++++++++++++++++++++++++++++++++ server/storage.ts | 6 +++++ shared/schema.ts | 3 +++ 3 files changed, 62 insertions(+) diff --git a/client/src/pages/admin.tsx b/client/src/pages/admin.tsx index 1fccb7e..6b29d59 100644 --- a/client/src/pages/admin.tsx +++ b/client/src/pages/admin.tsx @@ -214,6 +214,10 @@ function EditVideoDialog({ title: video.title, artist: video.artist || "", description: video.description, + filename: video.filename || "", + episodeNumber: video.episodeNumber || "", + episodeTitle: video.episodeTitle || "", + tags: video.tags || [], contentType: video.contentType, genre: video.genre, customThumbnailUrl: video.customThumbnailUrl || "", @@ -225,6 +229,10 @@ function EditVideoDialog({ title: video.title, artist: video.artist || "", description: video.description, + filename: video.filename || "", + episodeNumber: video.episodeNumber || "", + episodeTitle: video.episodeTitle || "", + tags: video.tags || [], contentType: video.contentType, genre: video.genre, customThumbnailUrl: video.customThumbnailUrl || "", @@ -353,6 +361,51 @@ function EditVideoDialog({ /> +
+ + setFormData({ ...formData, filename: e.target.value })} + className="bg-white/10 border-white/20 text-white" + placeholder="Original filename..." + /> +
+ +
+ + setFormData({ ...formData, episodeNumber: e.target.value })} + className="bg-white/10 border-white/20 text-white" + placeholder="e.g., 15" + /> +
+ +
+ + setFormData({ ...formData, episodeTitle: e.target.value })} + className="bg-white/10 border-white/20 text-white" + placeholder="e.g., Folx Stadl Special" + /> +
+ +
+ + { + 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)" + /> +
+
diff --git a/server/storage.ts b/server/storage.ts index 7b0fba4..5ad0339 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -436,6 +436,9 @@ export class MemStorage implements IStorage { description: video.description || "", category: video.category || "", artist: null, // Add artist field + filename: null, // Original filename + episodeNumber: null, // Episode number for shows + episodeTitle: null, // Episode title for shows customThumbnailUrl: null, faceCenterPosition: null, facesDetected: 0, @@ -493,6 +496,9 @@ export class MemStorage implements IStorage { description: video.description || "", category: video.category || "", artist: video.artist || null, // Add artist field + filename: video.filename || null, + episodeNumber: video.episodeNumber || null, + episodeTitle: video.episodeTitle || null, customThumbnailUrl: null, faceCenterPosition: null, facesDetected: 0, diff --git a/shared/schema.ts b/shared/schema.ts index 394650a..33193a2 100644 --- a/shared/schema.ts +++ b/shared/schema.ts @@ -12,6 +12,9 @@ export const videos = pgTable("videos", { title: text("title").notNull(), artist: text("artist"), // Izvajalec/Artist name 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(), customThumbnailUrl: text("custom_thumbnail_url"), faceCenterPosition: text("face_center_position"), // CSS object-position for face centering