Restored to 'fece380e79bc6a9f228eab122f91603a7f302684'

Replit-Restored-To: fece380e79
This commit is contained in:
sebastjanartic
2025-09-15 06:15:15 +00:00
parent 7d11140852
commit 1185bfc3af
3 changed files with 15 additions and 37 deletions
+4 -16
View File
@@ -100,33 +100,18 @@ export class BunnyService {
// No tags from Bunny.net - keeping tags empty
const tags: string[] = [];
// Clean up title by removing .mp4 extension if present
let cleanTitle = bunnyVideo.title || 'Untitled Video';
if (cleanTitle.toLowerCase().endsWith('.mp4')) {
cleanTitle = cleanTitle.slice(0, -4);
}
return {
id: bunnyVideo.guid,
title: cleanTitle,
artist: null, // No artist data from Bunny.net
title: bunnyVideo.title || 'Untitled Video',
description: description,
filename: null, // No filename data from Bunny.net
episodeNumber: null, // No episode number from Bunny.net
episodeTitle: null, // No episode title from Bunny.net
thumbnailUrl,
customThumbnailUrl: null,
faceCenterPosition: null,
facesDetected: null,
faceConfidence: null,
videoUrl: hlsUrl, // Signed HLS URL
videoUrlMp4: hlsUrl, // Use signed HLS URL for preview as well
videoUrlIframe: iframeUrl, // iframe fallback
duration: Math.floor(bunnyVideo.length || 0),
views: bunnyVideo.views || 0,
category: category,
contentType: "video" as const, // Default content type
genre: "other" as const, // Default genre
tags: tags,
isPublic: true,
uploadStatus: "completed",
@@ -136,6 +121,9 @@ export class BunnyService {
resolution: null,
format: null,
encoding: null,
faceCenterPosition: null,
facesDetected: null,
faceConfidence: null,
createdAt: new Date(bunnyVideo.dateUploaded),
updatedAt: new Date(bunnyVideo.dateUploaded)
};