From a1e7f28c9ef78e8930c0763c1e201800a815b122 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 13 Nov 2019 16:44:24 -0400 Subject: don't hard-code list of trackartless albums --- upd8.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'upd8.js') diff --git a/upd8.js b/upd8.js index 2855d19b..4b365758 100644 --- a/upd8.js +++ b/upd8.js @@ -221,6 +221,7 @@ async function processAlbumDataFile(file) { const albumName = getBasicField(albumSection, 'Album'); const albumArtists = getListField(albumSection, 'Artists') || getListField(albumSection, 'Artist'); const albumDate = getBasicField(albumSection, 'Date'); + const noTrackArt = (getBasicField(albumSection, 'Track Art') === 'none'); let albumDirectory = getBasicField(albumSection, 'Directory'); // I don't like these varia8le names. I'm sorry. -- I only really use the @@ -262,6 +263,7 @@ async function processAlbumDataFile(file) { date: dateValue, artists: albumArtists, directory: albumDirectory, + noTrackArt, theme: { fg: albumColorFG, bg: albumColorBG, @@ -644,13 +646,7 @@ function getAlbumCover(album) { function getTrackCover(track) { // Some al8ums don't have any track art at all, and in those, every track // just inherits the al8um's own cover art. - // TODO: Don't hard-c8de this! - if ([ - 'homestuck-vol-5', - 'squiddles', - 'medium', - 'symphony-impossible-to-play' - ].includes(track.album.directory)) { + if (track.album.noTrackArt) { return getAlbumCover(track.album); } else { return `${ALBUM_DIRECTORY}/${track.album.directory}/${track.directory}.jpg`; -- cgit 1.3.0-6-gf8a5