Make `set-tags.js` a bit more generic by disabling certain parts by default
This commit is contained in:
parent
503c8f2c88
commit
07406a1185
|
@ -45,11 +45,15 @@ function applyFixesToMainFields(file, tag) {
|
|||
for (const value of fields[key]) {
|
||||
if (isString(value.content)) {
|
||||
value.content = value.content.trim();
|
||||
if (isTruthy(settings.fixUmlauts)) {
|
||||
value.content = utility.fixUmlauts(value.content);
|
||||
}
|
||||
if (isTruthy(settings.formatNames)) {
|
||||
value.content = utility.formatName(value.content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function clearPersonalFields(file, tag) {
|
||||
|
@ -115,10 +119,16 @@ function addMiscFields(file, tag) {
|
|||
|
||||
function changeTagFields(file, tag) {
|
||||
logTagInfo(file, tag);
|
||||
|
||||
// change/add various fields; these values can still be overridden by specifying fields normally as CLI args
|
||||
applyFixesToMainFields(file, tag);
|
||||
clearPersonalFields(file, tag);
|
||||
addTotalNumberOfTracks(file, tag);
|
||||
addMiscFields(file, tag);
|
||||
if (isTruthy(settings.addLyrics)) {
|
||||
addLyrics(file, tag);
|
||||
//addCover(file, tag);
|
||||
}
|
||||
if (isTruthy(settings.addCover)) {
|
||||
addCover(file, tag);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue