Closed aza547 closed 1 month ago
Problem is that we are comparing "difficulty": "N",
to "normal" etc.
if (category === VideoCategory.Raids) {
const { difficulty } = metadata;
const orderedDifficulty = ['lfr', 'normal', 'heroic', 'mythic'];
const minDifficultyToUpload = cfg
.get<string>('cloudUploadRaidMinDifficulty')
.toLowerCase();
if (difficulty === undefined) {
console.info('[configUtils] Undefined difficulty, not blocking');
return true;
}
const actualIndex = orderedDifficulty.indexOf(difficulty);
const configuredIndex = orderedDifficulty.indexOf(minDifficultyToUpload);
if (actualIndex < 0) {
console.info('[configUtils] Unrecognised difficulty, not blocking');
return true;
}
if (actualIndex < configuredIndex) {
console.info('[configUtils] Raid encounter below upload threshold');
return false;
}
}
This setting is ignored.