api/create-filename: don't assign any of potentially blank tags

This commit is contained in:
wukko 2024-09-12 14:35:42 +06:00
parent 80a01494c7
commit e768e7f6fa
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

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