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
pull/522/head
Dan Collins 2 weeks ago
parent bbee33afb2
commit 615d5ca61b

@ -658,8 +658,12 @@ async function initializeVideoInfo() {
if (videoInfo.video_title) { if (videoInfo.video_title) {
titleElem.value = videoInfo.video_title; titleElem.value = videoInfo.video_title;
} else { } else {
// 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; titleElem.value = videoInfo.description;
} }
}
validateVideoTitle(); validateVideoTitle();
document.getElementById("video-info-title-abbreviated").innerText = document.getElementById("video-info-title-abbreviated").innerText =
videoInfo.title_prefix + titleElem.value; videoInfo.title_prefix + titleElem.value;
@ -668,8 +672,12 @@ async function initializeVideoInfo() {
if (videoInfo.video_description) { if (videoInfo.video_description) {
descriptionElem.value = videoInfo.video_description; descriptionElem.value = videoInfo.video_description;
} else { } else {
// 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; descriptionElem.value = videoInfo.description;
} }
}
validateVideoDescription(); validateVideoDescription();
const tagsElem = document.getElementById("video-info-tags"); const tagsElem = document.getElementById("video-info-tags");

Loading…
Cancel
Save