优化季节 NFO 文件处理逻辑,修复季号提取中的字符串分割问题,并增加日志记录以便于调试。
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 25s
Docker Build & Deploy / Deploy to Production (push) Successful in 5s

This commit is contained in:
孙诚
2025-04-22 17:43:09 +08:00
parent 1e4da61d68
commit aa1970a36e

View File

@@ -123,7 +123,7 @@ public class ChineseNfoRegistry : Registry, IChineseNfoRegistry
}
var sseasons = Directory.GetDirectories(Path.GetDirectoryName(tv) ?? string.Empty, "Season *", SearchOption.AllDirectories);
var sseasonsNumbers = sseasons.Select(x => x.Split("Season ", StringSplitOptions.None)[1]).Select(int.Parse).ToList();
var sseasonsNumbers = sseasons.Select(x => x.Split("Season ")[1]).Select(int.Parse).ToList();
foreach (var seasonNumber in sseasonsNumbers)
{
@@ -143,6 +143,8 @@ public class ChineseNfoRegistry : Registry, IChineseNfoRegistry
{
ctn.episodeNfoPath = episode;
_logger.LogInformation("ctn.episodeNfoPath: " + ctn.episodeNfoPath);
await HandleEpisode();
}
}