api/create-filename: don't require author for pretty title

This commit is contained in:
wukko 2024-11-28 15:47:30 +06:00
parent 55c97f77b8
commit eee9beef91
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -15,7 +15,11 @@ export default (f, style, isAudioOnly, isAudioMuted) => {
let classicTags = [...infoBase];
let basicTags = [];
const title = `${sanitizeString(f.title)} - ${sanitizeString(f.author)}`;
let title = sanitizeString(f.title);
if (f.author) {
title += ` - ${sanitizeString(f.author)}`;
}
if (f.resolution) {
classicTags.push(f.resolution);