Skip to content

Commit

Permalink
Merge pull request 'dev' (#36) from dev into main
Browse files Browse the repository at this point in the history
  • Loading branch information
FleyX committed Dec 4, 2022
2 parents b0fe955 + b3df968 commit 7dfd433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openRenamerBackend/entity/bo/rules/AutoRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from 'path';

let pattern = new RegExp(/s(eason)?(\d+)/);
let eNumPatternArr = [new RegExp(/e(\d+)/), new RegExp(/\((\d+)\)/), new RegExp(/((\d+))/), new RegExp(/\.(\d+)\./), new RegExp(/-(\d+)-/), new RegExp(/(\d+)/)];
let resolutionPattern = new RegExp(/(\d+[pP])/);
let resolutionPattern = new RegExp(/(\d{3,}[pP])/);
let resolutionArr = ['1k', '1K', '2k', '2K', '4k', '4K', '8k', '8K'];
let charSet = new Set([' ', '[', '.', '(', '(']);
export default class InsertRule implements RuleInterface {
Expand Down Expand Up @@ -57,7 +57,7 @@ export default class InsertRule implements RuleInterface {
getStr += char;
}
} else if (this.type === 'eNum') {
let lowName = file.originName.toLocaleLowerCase();
let lowName = file.originName.toLocaleLowerCase().replace(/ /g, '');
for (let i in eNumPatternArr) {
let patternRes = lowName.match(eNumPatternArr[i]);
if (patternRes && patternRes.length > 1) {
Expand Down

0 comments on commit 7dfd433

Please sign in to comment.