Add artist/performer information to videos and admin interface
Update database schema and admin UI to include an 'artist' field for videos, and configure agent integrations for database access. 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/QfqdFa4
This commit is contained in:
parent
3d303ea68a
commit
e117f3617b
2
.replit
2
.replit
@ -40,4 +40,4 @@ args = "npm run dev"
|
|||||||
waitForPort = 5000
|
waitForPort = 5000
|
||||||
|
|
||||||
[agent]
|
[agent]
|
||||||
integrations = ["javascript_openai==1.0.0"]
|
integrations = ["javascript_database==1.0.0", "javascript_openai==1.0.0"]
|
||||||
|
|||||||
@ -212,6 +212,7 @@ function EditVideoDialog({
|
|||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
title: video.title,
|
title: video.title,
|
||||||
|
artist: video.artist || "",
|
||||||
description: video.description,
|
description: video.description,
|
||||||
contentType: video.contentType,
|
contentType: video.contentType,
|
||||||
genre: video.genre,
|
genre: video.genre,
|
||||||
@ -222,6 +223,7 @@ function EditVideoDialog({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setFormData({
|
setFormData({
|
||||||
title: video.title,
|
title: video.title,
|
||||||
|
artist: video.artist || "",
|
||||||
description: video.description,
|
description: video.description,
|
||||||
contentType: video.contentType,
|
contentType: video.contentType,
|
||||||
genre: video.genre,
|
genre: video.genre,
|
||||||
@ -331,7 +333,7 @@ function EditVideoDialog({
|
|||||||
|
|
||||||
<form onSubmit={handleSubmit} className="space-y-6">
|
<form onSubmit={handleSubmit} className="space-y-6">
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||||
<div className="md:col-span-2">
|
<div>
|
||||||
<Label className="text-white/90">Title</Label>
|
<Label className="text-white/90">Title</Label>
|
||||||
<Input
|
<Input
|
||||||
value={formData.title}
|
value={formData.title}
|
||||||
@ -341,6 +343,16 @@ function EditVideoDialog({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Label className="text-white/90">Artist/Izvajalec</Label>
|
||||||
|
<Input
|
||||||
|
value={formData.artist}
|
||||||
|
onChange={(e) => setFormData({ ...formData, artist: e.target.value })}
|
||||||
|
className="bg-white/10 border-white/20 text-white"
|
||||||
|
placeholder="Enter artist/band name..."
|
||||||
|
/>
|
||||||
|
</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>
|
||||||
|
|||||||
@ -435,6 +435,7 @@ export class MemStorage implements IStorage {
|
|||||||
id,
|
id,
|
||||||
description: video.description || "",
|
description: video.description || "",
|
||||||
category: video.category || "",
|
category: video.category || "",
|
||||||
|
artist: null, // Add artist field
|
||||||
customThumbnailUrl: null,
|
customThumbnailUrl: null,
|
||||||
faceCenterPosition: null,
|
faceCenterPosition: null,
|
||||||
facesDetected: 0,
|
facesDetected: 0,
|
||||||
@ -491,6 +492,7 @@ export class MemStorage implements IStorage {
|
|||||||
id,
|
id,
|
||||||
description: video.description || "",
|
description: video.description || "",
|
||||||
category: video.category || "",
|
category: video.category || "",
|
||||||
|
artist: video.artist || null, // Add artist field
|
||||||
customThumbnailUrl: null,
|
customThumbnailUrl: null,
|
||||||
faceCenterPosition: null,
|
faceCenterPosition: null,
|
||||||
facesDetected: 0,
|
facesDetected: 0,
|
||||||
|
|||||||
@ -10,6 +10,7 @@ export const genreEnum = pgEnum('genre', ['volksmusik', 'schlager', 'pop', 'rock
|
|||||||
export const videos = pgTable("videos", {
|
export const videos = pgTable("videos", {
|
||||||
id: varchar("id").primaryKey().default(sql`gen_random_uuid()`),
|
id: varchar("id").primaryKey().default(sql`gen_random_uuid()`),
|
||||||
title: text("title").notNull(),
|
title: text("title").notNull(),
|
||||||
|
artist: text("artist"), // Izvajalec/Artist name
|
||||||
description: text("description").default("").notNull(),
|
description: text("description").default("").notNull(),
|
||||||
thumbnailUrl: text("thumbnail_url").notNull(),
|
thumbnailUrl: text("thumbnail_url").notNull(),
|
||||||
customThumbnailUrl: text("custom_thumbnail_url"),
|
customThumbnailUrl: text("custom_thumbnail_url"),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user