Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raid difficulty upload setting not respected #529

Closed
aza547 opened this issue Sep 19, 2024 · 1 comment
Closed

Raid difficulty upload setting not respected #529

aza547 opened this issue Sep 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@aza547
Copy link
Owner

aza547 commented Sep 19, 2024

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

This setting is ignored.

@aza547 aza547 added the bug Something isn't working label Sep 19, 2024
@aza547
Copy link
Owner Author

aza547 commented Sep 19, 2024

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

@aza547 aza547 closed this as completed in 30e4e5f Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant