Skip to content

Commit

Permalink
修复内置规则逻辑错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Chikage0o0 committed Mar 15, 2023
1 parent e026163 commit bf9c486
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions UPDATELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.2.2

- 修复内置规则逻辑错误

## v0.2.1

- 添加内置正则表达式匹配电影和电视剧
Expand Down
4 changes: 3 additions & 1 deletion src-tauri/src/utils/matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ pub async fn internal_matcher<P: AsRef<Path>>(file: P) -> Result<(), MatcherErro
)
.await
.map_err(|e| MatcherError::ProcessError(e.to_string()))?;
return Ok(());
} else {
log::error!("Can't find `{}`", title);
}
Expand All @@ -281,6 +282,7 @@ pub async fn internal_matcher<P: AsRef<Path>>(file: P) -> Result<(), MatcherErro
nfo::movie::process(&id, provider, lang, &path)
.await
.map_err(|e| MatcherError::ProcessError(e.to_string()))?;
return Ok(());
} else {
log::error!("Can't find `{}`", title);
}
Expand All @@ -293,5 +295,5 @@ pub async fn internal_matcher<P: AsRef<Path>>(file: P) -> Result<(), MatcherErro
}
}
}
Ok(())
return Err(MatcherError::FileNotMatch(file.as_ref().to_path_buf()));
}

0 comments on commit bf9c486

Please sign in to comment.