From 9a1fc2fc4dafde79c12f4d6eb2217e74788b4606 Mon Sep 17 00:00:00 2001
From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com>
Date: Wed, 17 Sep 2025 07:21:48 +0000
Subject: [PATCH] Improve video title and artist display on the platform
Update video card component to correctly display video titles and artist/performer names, handling cases where artist information is not directly provided by extracting it from the video title.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 45a1dcfc-f8a2-475a-a6b9-96fbb841dc27
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/60d372ff-2c10-46c7-b01b-10c3435136b0/45a1dcfc-f8a2-475a-a6b9-96fbb841dc27/pjFeepJ
---
client/src/components/video-card.tsx | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/client/src/components/video-card.tsx b/client/src/components/video-card.tsx
index 104b2ed..4bebe92 100644
--- a/client/src/components/video-card.tsx
+++ b/client/src/components/video-card.tsx
@@ -327,13 +327,13 @@ export default function VideoCard({ video, onClick, className = "", hideOverlay
{!showPreview && !hideOverlay && !(isMobile && isVideoPage) && (
- {/* Artist in UPPERCASE - first line */}
+ {/* Artist/Performer in UPPERCASE - first line */}
- {video.artist ? video.artist.substring(0, 35) : (video.title.split(' - ')[0] || 'video.folx.tv').substring(0, 35)}
+ {(video.title.split(' - ')[0] || 'video.folx.tv').substring(0, 35)}
{/* Song title - second line */}
- {video.artist ? video.title.substring(0, 50) : (video.title.split(' - ')[1] || video.title).substring(0, 50)}
+ {(video.title.split(' - ')[1] || video.title).substring(0, 50)}
@@ -343,16 +343,13 @@ export default function VideoCard({ video, onClick, className = "", hideOverlay
{/* Mobile info section - below video - only on video pages */}
{isMobile && isVideoPage && (
- {/* Artist in UPPERCASE - first line */}
+ {/* Artist/Performer in UPPERCASE - first line */}
- {video.artist ? (video.artist.length > 30 ? video.artist.substring(0, 30) + '...' : video.artist) : (video.title.split(' - ')[0] || 'video.folx.tv')}
+ {(video.title.split(' - ')[0] || 'video.folx.tv').length > 30 ? (video.title.split(' - ')[0] || 'video.folx.tv').substring(0, 30) + '...' : (video.title.split(' - ')[0] || 'video.folx.tv')}
{/* Song title - second line */}
- {video.artist ?
- (video.title.length > 40 ? video.title.substring(0, 40) + '...' : video.title) :
- (video.title.split(' - ')[1] || video.title).length > 40 ? (video.title.split(' - ')[1] || video.title).substring(0, 40) + '...' : (video.title.split(' - ')[1] || video.title)
- }
+ {(video.title.split(' - ')[1] || video.title).length > 40 ? (video.title.split(' - ')[1] || video.title).substring(0, 40) + '...' : (video.title.split(' - ')[1] || video.title)}
{/* Views and Date in one line */}