From 30e4e5f20482dee92a443900dd4c7d00168c32a5 Mon Sep 17 00:00:00 2001 From: aza547 Date: Thu, 19 Sep 2024 21:36:34 +0100 Subject: [PATCH] fixes #529 --- CHANGELOG.md | 1 + src/main/VideoProcessQueue.ts | 6 ++++++ src/utils/configUtils.ts | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd4c3a61..8d669f77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - [Issue 518](https://github.com/aza547/wow-recorder/issues/518) - Fix some minor UI issues. +- [Issue 529](https://github.com/aza547/wow-recorder/issues/529) - Raid upload difficulty threshold is no longer ignored. - Improve OBS signal handling to be more robust to timeouts. - Update TWW season 1 M+ timers. diff --git a/src/main/VideoProcessQueue.ts b/src/main/VideoProcessQueue.ts index de6f540b..a1f4109e 100644 --- a/src/main/VideoProcessQueue.ts +++ b/src/main/VideoProcessQueue.ts @@ -168,6 +168,9 @@ export default class VideoProcessQueue { this.videoQueue.write(item); }; + /** + * Queue a video for upload. + */ public queueUpload = async (item: UploadQueueItem) => { const alreadyQueued = this.inProgressUploads.includes(item.path); @@ -180,6 +183,9 @@ export default class VideoProcessQueue { this.uploadQueue.write(item); }; + /** + * Queue a video for download. + */ public queueDownload = async (video: RendererVideo) => { const { videoName } = video; const alreadyQueued = this.inProgressDownloads.includes(video.videoName); diff --git a/src/utils/configUtils.ts b/src/utils/configUtils.ts index 1bbfe1cf..3ae8a8eb 100644 --- a/src/utils/configUtils.ts +++ b/src/utils/configUtils.ts @@ -67,7 +67,9 @@ const shouldUpload = (cfg: ConfigService, metadata: Metadata) => { if (category === VideoCategory.Raids) { const { difficulty } = metadata; + const orderedDifficulty = ['lfr', 'normal', 'heroic', 'mythic']; + const orderedDifficultyIDs = ['LFR', 'N', 'HC', 'M']; const minDifficultyToUpload = cfg .get('cloudUploadRaidMinDifficulty') @@ -78,8 +80,8 @@ const shouldUpload = (cfg: ConfigService, metadata: Metadata) => { return true; } - const actualIndex = orderedDifficulty.indexOf(difficulty); const configuredIndex = orderedDifficulty.indexOf(minDifficultyToUpload); + const actualIndex = orderedDifficultyIDs.indexOf(difficulty); if (actualIndex < 0) { console.info('[configUtils] Unrecognised difficulty, not blocking');