Make `set-tags.js` a bit more generic by disabling certain parts by default
This commit is contained in:
parent
503c8f2c88
commit
07406a1185
|
@ -45,8 +45,12 @@ function applyFixesToMainFields(file, tag) {
|
||||||
for (const value of fields[key]) {
|
for (const value of fields[key]) {
|
||||||
if (isString(value.content)) {
|
if (isString(value.content)) {
|
||||||
value.content = value.content.trim();
|
value.content = value.content.trim();
|
||||||
value.content = utility.fixUmlauts(value.content);
|
if (isTruthy(settings.fixUmlauts)) {
|
||||||
value.content = utility.formatName(value.content);
|
value.content = utility.fixUmlauts(value.content);
|
||||||
|
}
|
||||||
|
if (isTruthy(settings.formatNames)) {
|
||||||
|
value.content = utility.formatName(value.content);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,10 +119,16 @@ function addMiscFields(file, tag) {
|
||||||
|
|
||||||
function changeTagFields(file, tag) {
|
function changeTagFields(file, tag) {
|
||||||
logTagInfo(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);
|
applyFixesToMainFields(file, tag);
|
||||||
clearPersonalFields(file, tag);
|
clearPersonalFields(file, tag);
|
||||||
addTotalNumberOfTracks(file, tag);
|
addTotalNumberOfTracks(file, tag);
|
||||||
addMiscFields(file, tag);
|
addMiscFields(file, tag);
|
||||||
addLyrics(file, tag);
|
if (isTruthy(settings.addLyrics)) {
|
||||||
//addCover(file, tag);
|
addLyrics(file, tag);
|
||||||
|
}
|
||||||
|
if (isTruthy(settings.addCover)) {
|
||||||
|
addCover(file, tag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue