From d9b4da9dd11127b0df9c8b8559185792a91d167e Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Sat, 7 May 2022 17:25:42 +0200 Subject: [PATCH] More album information --- src/getAlbums.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/getAlbums.js b/src/getAlbums.js index 6ba6ea1..8239400 100644 --- a/src/getAlbums.js +++ b/src/getAlbums.js @@ -44,9 +44,14 @@ const rl = readline.createInterface({ break; } } + const album = albums[Number.parseInt(albumIndex) - 1]; rl.close(); - secrets.albumId = albums[albumIndex-1].id; - console.log("Writeing album ID to secrets..."); + console.log("Writeing album settings to secrets..."); + secrets.album = { + name: album.title, + id: album.id, + count: album.mediaItemsCount + }; writeFileSync(secretsFile, JSON.stringify(secrets, null, 2)); console.log("Done!"); })()