Compare commits

...

2 Commits

Author SHA1 Message Date
Dan Collins 3d9490d335 If an empty title/desc was saved, keep it rather than using the default 3 months ago
Dan Collins a04a318ea8 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
3 months ago

@ -655,20 +655,31 @@ async function initializeVideoInfo() {
titlePrefixElem.innerText = videoInfo.title_prefix;
const titleElem = document.getElementById("video-info-title");
if (videoInfo.video_title) {
if (videoInfo.video_title !== null) {
// If a video titles was saved (even if it is blank), use that. Titles
// can't currently be blank, but we may be loosening validation for drafts.
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 =
videoInfo.title_prefix + titleElem.value;
const descriptionElem = document.getElementById("video-info-description");
if (videoInfo.video_description) {
if (videoInfo.video_description !== null) {
// If a video description was saved (even if it is blank), use that.
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();

Loading…
Cancel
Save