twitch: sanitise video title

This commit is contained in:
wukko 2023-11-23 21:43:35 +06:00
parent d2e124c7cd
commit 158361c95e

View file

@ -67,13 +67,13 @@ export default async function (obj) {
token: req_token[0].data.clip.playbackAccessToken.value token: req_token[0].data.clip.playbackAccessToken.value
})}`, })}`,
fileMetadata: { fileMetadata: {
title: clipMetadata.title, title: cleanString(clipMetadata.title.trim()),
artist: `Twitch Clip by @${clipMetadata.broadcaster.login}, clipped by @${clipMetadata.curator.login}`, artist: `Twitch Clip by @${clipMetadata.broadcaster.login}, clipped by @${clipMetadata.curator.login}`,
}, },
filenameAttributes: { filenameAttributes: {
service: "twitch", service: "twitch",
id: clipMetadata.id, id: clipMetadata.id,
title: clipMetadata.title, title: cleanString(clipMetadata.title.trim()),
author: `${clipMetadata.broadcaster.login}, clipped by ${clipMetadata.curator.login}`, author: `${clipMetadata.broadcaster.login}, clipped by ${clipMetadata.curator.login}`,
qualityLabel: `${format.quality}p`, qualityLabel: `${format.quality}p`,
extension: 'mp4' extension: 'mp4'