From ee8ee320e07b9b7fadc38ce175016de9b16da297 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Wed, 25 Aug 2021 01:02:07 -0700 Subject: [PATCH] autofill with Unknown for empty prompt --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index d1ac68f..c9d2b8d 100644 --- a/index.js +++ b/index.js @@ -139,6 +139,10 @@ async function thing(source, excess) { if (artist === null) artist = await query('Artist'); if (title === null) title = await query('Title'); + if (album === "") album = "Unknown Album"; + if (artist === "") album = "Unknown Artist"; + if (title === "") throw "Please do not take the piss"; + return { file: Path.join(TMP_DIR, rawFilePath), image: Path.join(TMP_DIR, rawImagePath),