mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-13 11:09:49 +08:00
chore: bump version to 3.2.3-beta.3
fix: Episode 0 incorrectly renamed to E01 (#977) fix: NoneType error in match_list when title_raw is null (#976) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,3 +1,16 @@
|
||||
# [3.2.3-beta.3] - 2026-01-30
|
||||
|
||||
## Backend
|
||||
|
||||
### Fixes
|
||||
|
||||
- 修复第 0 集被错误重命名为第 1 集的问题 (#977)
|
||||
- Episode 0 (S01E00) 现在会正确保留,不再被转换为 E01
|
||||
- 修复聚合 RSS 解析时 `title_raw` 为空导致崩溃的问题 (#976)
|
||||
- `match_list()` 现在会跳过空的标题,避免 `TypeError`
|
||||
|
||||
---
|
||||
|
||||
# [3.2.3-beta.2] - 2026-01-28
|
||||
|
||||
## Backend
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "auto-bangumi"
|
||||
version = "3.2.3-beta.2"
|
||||
version = "3.2.3-beta.3"
|
||||
description = "AutoBangumi - Automated anime download manager"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
|
||||
@@ -389,11 +389,13 @@ class BangumiDatabase:
|
||||
# Include both title_raw and all aliases
|
||||
title_index: dict[str, Bangumi] = {}
|
||||
for m in match_datas:
|
||||
# Add main title_raw
|
||||
title_index[m.title_raw] = m
|
||||
# Add main title_raw (skip if None to avoid TypeError in sorted())
|
||||
if m.title_raw:
|
||||
title_index[m.title_raw] = m
|
||||
# Add all aliases
|
||||
for alias in _get_aliases_list(m):
|
||||
title_index[alias] = m
|
||||
if alias:
|
||||
title_index[alias] = m
|
||||
|
||||
# Build compiled regex pattern for fast substring matching
|
||||
# Sort by length descending so longer (more specific) matches are found first
|
||||
|
||||
@@ -67,20 +67,13 @@ class Renamer(DownloadClient):
|
||||
# Apply episode offset
|
||||
original_episode = int(file_info.episode)
|
||||
adjusted_episode = original_episode + episode_offset
|
||||
if adjusted_episode < 1:
|
||||
if original_episode < 1:
|
||||
# Parsed episode is 0 or negative - likely a parsing issue or special episode
|
||||
# Use episode 1 as fallback to avoid invalid filenames
|
||||
adjusted_episode = 1
|
||||
logger.debug(
|
||||
f"[Renamer] Parsed episode {original_episode} is invalid, using episode 1"
|
||||
)
|
||||
else:
|
||||
# Offset would make episode negative - ignore the offset
|
||||
adjusted_episode = original_episode
|
||||
logger.warning(
|
||||
f"[Renamer] Episode offset {episode_offset} would make episode {original_episode} negative, ignoring offset"
|
||||
)
|
||||
# Episode 0 is valid (specials, OVAs, etc.) - only handle truly negative results
|
||||
if adjusted_episode < 0:
|
||||
# Offset would make episode negative - ignore the offset
|
||||
adjusted_episode = original_episode
|
||||
logger.warning(
|
||||
f"[Renamer] Episode offset {episode_offset} would make episode {original_episode} negative, ignoring offset"
|
||||
)
|
||||
episode = f"0{adjusted_episode}" if adjusted_episode < 10 else adjusted_episode
|
||||
if method == "none" or method == "subtitle_none":
|
||||
return file_info.media_path
|
||||
@@ -148,8 +141,9 @@ class Renamer(DownloadClient):
|
||||
# Only apply episode offset
|
||||
original_ep = int(ep.episode)
|
||||
adjusted_episode = original_ep + episode_offset
|
||||
if adjusted_episode < 1:
|
||||
adjusted_episode = 1 if original_ep < 1 else original_ep
|
||||
# Episode 0 is valid - only handle truly negative results
|
||||
if adjusted_episode < 0:
|
||||
adjusted_episode = original_ep
|
||||
return Notification(
|
||||
official_title=bangumi_name,
|
||||
season=ep.season,
|
||||
|
||||
Reference in New Issue
Block a user