合集 刮削优化

This commit is contained in:
jianzhichu
2026-02-12 17:29:22 +08:00
parent 9784114c90
commit cd24804273
4 changed files with 23 additions and 2 deletions
+12
View File
@@ -77,6 +77,11 @@ namespace dy.net.utils
nfoFullPath = Path.Combine(directory, "tvshow.nfo");
if (!File.Exists(nfoFullPath))
GenerateNfoFile(nfoInfo, nfoFullPath, "tvshow");
var nfoFullPathMix = Path.Combine(directory, Path.GetFileNameWithoutExtension(video.VideoSavePath) + ".nfo");
if (!File.Exists(nfoFullPathMix))
GenerateNfoFile(nfoInfo, nfoFullPathMix, "episodedetails");
}
else
{
@@ -159,6 +164,13 @@ namespace dy.net.utils
new XElement("thumb", CleanInvalidXmlChars(videoInfo.Poster))
));
if (xmlRoot == "episodedetails")
{
root.Add(new XElement("episode", Path.GetFileNameWithoutExtension(filePath).Replace("S01E0","").Replace("S01E","")));
root.Add(new XElement("season", "1"));
}
// 创建XDocument并保存
XDocument doc = new XDocument(
new XDeclaration("1.0", "utf-8", "yes"),