Skip to content

Commit

Permalink
fix #76 Wrong rule applied for video_file (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
EverettSummer authored Dec 3, 2024
1 parent ad85f0e commit 75c2f25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JobScheduler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 IROHA LAB
* Copyright 2024 IROHA LAB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -143,7 +143,7 @@ export class JobScheduler implements JobApplication {
const rules = await this._databaseService.getVideoProcessRuleRepository().findByBangumiId(msg.bangumiId);

if (rules && rules.length > 0) {
if (rules.length === 1 && rules[0].condition === null) {
if (rules.length === 1 && rules[0].condition === null && (!rules[0].videoFileId || rules[0].videoFileId === msg.videoId)) {
appliedRule = rules[0];
} else {
// take the first matched condition as the rule is already returned as higher priority first.
Expand Down

0 comments on commit 75c2f25

Please sign in to comment.