respect newlines in video long description
deploy / build-and-deploy (push) Successful in 34s

This commit is contained in:
bytedream committed 2026-10-31 14:34:17 +01:00
1 parent 68f0b95fe5
commit 316f83edf2
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ const thumbnailUrl = siteUrl(`video/${encodeURIComponent(video.name)}/thumbnail.
<VideoPlayer client:load src={streamUrl} type={video.contentType} title={title} poster={thumbnailUrl} /> <VideoPlayer client:load src={streamUrl} type={video.contentType} title={title} poster={thumbnailUrl} />
{longDescription && ( {longDescription && (
<p class="max-w-3xl text-base leading-relaxed whitespace-pre-line text-base-content/70">{longDescription}</p> <p class="text-base leading-relaxed whitespace-pre-wrap text-base-content/70">{longDescription}</p>
)} )}
</section> </section>
</WebsiteLayout> </WebsiteLayout>
+1 -1
View File
@@ -116,7 +116,7 @@ export async function getVideoMetadata(video: ResolvedVideo): Promise<VideoMetad
metadata = { metadata = {
title: tags['title'] || video.name, title: tags['title'] || video.name,
description: tags['description'], description: tags['description'],
longDescription: tags['synopsis'] longDescription: tags['synopsis']?.replace(/\\r\\n|\\n/g, '\n') ?? null
}; };
} catch (e) { } catch (e) {
logger.warn({ error: e instanceof Error ? e.message : String(e) }, 'error while reading video metadata'); logger.warn({ error: e instanceof Error ? e.message : String(e) }, 'error while reading video metadata');