From 615d5ca61ba4fdf9435a5f83304fa73e3a3844d7 Mon Sep 17 00:00:00 2001 From: Dan Collins Date: Sat, 18 Jan 2025 23:23:16 -0500 Subject: [PATCH] Thrimbletrimmer: Default title to blank to encourage editors to write their own This patch simply uses the RDP tag to decide whether to use the row description as a default for the video title, or for the video description. This will probably be changed by #479 down the line, but that's lower priority and more complex, so this is a good starting point. Resolves #504 --- thrimbletrimmer/scripts/edit.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/thrimbletrimmer/scripts/edit.js b/thrimbletrimmer/scripts/edit.js index 5e976cf..ecc5118 100644 --- a/thrimbletrimmer/scripts/edit.js +++ b/thrimbletrimmer/scripts/edit.js @@ -658,7 +658,11 @@ async function initializeVideoInfo() { if (videoInfo.video_title) { titleElem.value = videoInfo.video_title; } else { - titleElem.value = videoInfo.description; + // If a video title hasn't been set yet, leave it blank. + // Exception: RDPs always use the standard title. + if (videoInfo.tags.includes("RDP")) { + titleElem.value = videoInfo.description; + } } validateVideoTitle(); document.getElementById("video-info-title-abbreviated").innerText = @@ -668,7 +672,11 @@ async function initializeVideoInfo() { if (videoInfo.video_description) { descriptionElem.value = videoInfo.video_description; } else { - descriptionElem.value = videoInfo.description; + // If a video description hasn't been set yet, use the descripton from the row. + // Exception: RDPs start blank because the row is used for the title. + if (!videoInfo.tags.includes("RDP")) { + descriptionElem.value = videoInfo.description; + } } validateVideoDescription();