From eee9beef91fcec29c6f697bd4fb192cdf2e21c70 Mon Sep 17 00:00:00 2001 From: wukko Date: Thu, 28 Nov 2024 15:47:30 +0600 Subject: [PATCH] api/create-filename: don't require author for pretty title --- api/src/processing/create-filename.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/src/processing/create-filename.js b/api/src/processing/create-filename.js index cc985d51..911b5603 100644 --- a/api/src/processing/create-filename.js +++ b/api/src/processing/create-filename.js @@ -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);