Skip to content

Commit

Permalink
兼容下划线分割的文件名
Browse files Browse the repository at this point in the history
  • Loading branch information
Nriver committed May 12, 2023
1 parent a2be4a2 commit 42412da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion EpisodeReName.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ def get_season_and_ep(file_path):
pat += bracket_pair[0] + '.*?' + bracket_pair[1] + '|'
pat = pat[:-1]
# 兼容某些用 - 分隔的文件
pat += '|\-'
pat += '|\-|\_'
logger.info(f'pat {pat}')
res = re.split(pat, file_name)
# 过滤空字符串
res = list(filter(None, res))
Expand Down

0 comments on commit 42412da

Please sign in to comment.