From 64173f7a03bc67dfb57ec35fcd9061322be50540 Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 11 Sep 2024 22:18:51 +0600 Subject: [PATCH] api/create-filename: don't push youtubeFormat if it doesn't exist oops --- api/src/processing/create-filename.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/src/processing/create-filename.js b/api/src/processing/create-filename.js index d1758c00..4f248377 100644 --- a/api/src/processing/create-filename.js +++ b/api/src/processing/create-filename.js @@ -2,16 +2,16 @@ export default (f, style, isAudioOnly, isAudioMuted) => { let filename = ''; let infoBase = [f.service, f.id]; - - let classicTags = infoBase.concat([ - f.resolution, - f.youtubeFormat, - ]); - - let basicTags = [f.qualityLabel, f.youtubeFormat]; + let classicTags = [...infoBase, f.resolution]; + let basicTags = [f.qualityLabel]; const title = `${f.title} - ${f.author}`; + if (f.youtubeFormat) { + classicTags.push(f.youtubeFormat); + basicTags.push(f.youtubeFormat); + } + if (isAudioMuted) { classicTags.push("mute"); basicTags.push("mute");