api/create-filename: don't push youtubeFormat if it doesn't exist

oops
This commit is contained in:
wukko 2024-09-11 22:18:51 +06:00
parent 4af48dd2f9
commit 64173f7a03
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -2,16 +2,16 @@ export default (f, style, isAudioOnly, isAudioMuted) => {
let filename = ''; let filename = '';
let infoBase = [f.service, f.id]; let infoBase = [f.service, f.id];
let classicTags = [...infoBase, f.resolution];
let classicTags = infoBase.concat([ let basicTags = [f.qualityLabel];
f.resolution,
f.youtubeFormat,
]);
let basicTags = [f.qualityLabel, f.youtubeFormat];
const title = `${f.title} - ${f.author}`; const title = `${f.title} - ${f.author}`;
if (f.youtubeFormat) {
classicTags.push(f.youtubeFormat);
basicTags.push(f.youtubeFormat);
}
if (isAudioMuted) { if (isAudioMuted) {
classicTags.push("mute"); classicTags.push("mute");
basicTags.push("mute"); basicTags.push("mute");