From dd0bbd74c55ee2c9783c4410d53334eff75fde6d Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 29 Dec 2023 15:47:32 +0100 Subject: [PATCH] Update use of `albumArtist` in examples of renaming utility --- resources/scripts/renamefiles/advanced-example.js | 4 ++-- resources/scripts/renamefiles/simple-example.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/scripts/renamefiles/advanced-example.js b/resources/scripts/renamefiles/advanced-example.js index fc17a97..a0cc0cb 100644 --- a/resources/scripts/renamefiles/advanced-example.js +++ b/resources/scripts/renamefiles/advanced-example.js @@ -137,7 +137,7 @@ if (fileInfo.currentSuffix === "tmp") { var fields = [] // get the artist (preferably album artist), remove invalid characters and add it to fields array -var artist = validFileName(tag.albumartist || tag.artist) +var artist = validFileName(tag.albumArtist || tag.artist) if (includeArtist && !isPartOfCollection(tag) && notEmpty(artist)) { fields.push(trailingBracketsStripped(firstValue(artist))) } @@ -219,7 +219,7 @@ if (distDir) { } else if (tag.comment.includes("single")) { path.push("singles"); } - var artist = validDirectoryName(firstValue(tag.albumartist || tag.artist)) + var artist = validDirectoryName(firstValue(tag.albumArtist || tag.artist)) if (isPartOfCollection(tag)) { path.push(collectionsDir) } else if (notEmpty(artist) && !isMiscFile(tag)) { diff --git a/resources/scripts/renamefiles/simple-example.js b/resources/scripts/renamefiles/simple-example.js index 77aa111..ed9311a 100644 --- a/resources/scripts/renamefiles/simple-example.js +++ b/resources/scripts/renamefiles/simple-example.js @@ -22,7 +22,7 @@ if (!fileInfo.hasAudioTracks && !fileInfo.hasVideoTracks) { } // make new filename -const fieldsToInclude = [tag.albumartist || tag.artist, tag.album, tag.trackPos || infoFromFileName.trackPos, tag.title || infoFromFileName.title] +const fieldsToInclude = [tag.albumArtist || tag.artist, tag.album, tag.trackPos || infoFromFileName.trackPos, tag.title || infoFromFileName.title] let newName = "" for (let field of fieldsToInclude) { field = field.toString()