aza547 / wow-recorder

A desktop screen recorder application that records and saves videos of in-game World of Warcraft encounters, and provides a graphical user interface to view the replays. It is free, open source and contains no adverts.
http://www.warcraftrecorder.com
Other
151 stars 31 forks source link

Raid difficulty upload setting not respected #529

Closed aza547 closed 1 month ago

aza547 commented 1 month ago

{566B8589-FDD7-400C-9914-E360C1628518}

This setting is ignored.

aza547 commented 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;
    }
  }