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");