Merge pull request #1726 from sundxfansky/main

This commit is contained in:
jxxghp 2024-03-22 06:53:18 +08:00 committed by GitHub
commit c4e7870f7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 15 deletions

View File

@ -83,10 +83,6 @@ class DoubanScraper:
@staticmethod @staticmethod
def __gen_common_nfo(mediainfo: MediaInfo, doc, root): def __gen_common_nfo(mediainfo: MediaInfo, doc, root):
# 添加时间
DomUtils.add_node(doc, root, "dateadded",
time.strftime('%Y-%m-%d %H:%M:%S',
time.localtime(time.time())))
# 简介 # 简介
xplot = DomUtils.add_node(doc, root, "plot") xplot = DomUtils.add_node(doc, root, "plot")
xplot.appendChild(doc.createCDATASection(mediainfo.overview or "")) xplot.appendChild(doc.createCDATASection(mediainfo.overview or ""))
@ -166,8 +162,6 @@ class DoubanScraper:
logger.info(f"正在生成季NFO文件{season_path.name}") logger.info(f"正在生成季NFO文件{season_path.name}")
doc = minidom.Document() doc = minidom.Document()
root = DomUtils.add_node(doc, doc, "season") root = DomUtils.add_node(doc, doc, "season")
# 添加时间
DomUtils.add_node(doc, root, "dateadded", time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))
# 简介 # 简介
xplot = DomUtils.add_node(doc, root, "plot") xplot = DomUtils.add_node(doc, root, "plot")
xplot.appendChild(doc.createCDATASection(mediainfo.overview or "")) xplot.appendChild(doc.createCDATASection(mediainfo.overview or ""))

View File

@ -151,10 +151,6 @@ class TmdbScraper:
""" """
生成公共NFO 生成公共NFO
""" """
# 添加时间
DomUtils.add_node(doc, root, "dateadded",
time.strftime('%Y-%m-%d %H:%M:%S',
time.localtime(time.time())))
# TMDB # TMDB
DomUtils.add_node(doc, root, "tmdbid", mediainfo.tmdb_id or "") DomUtils.add_node(doc, root, "tmdbid", mediainfo.tmdb_id or "")
uniqueid_tmdb = DomUtils.add_node(doc, root, "uniqueid", mediainfo.tmdb_id or "") uniqueid_tmdb = DomUtils.add_node(doc, root, "uniqueid", mediainfo.tmdb_id or "")
@ -267,9 +263,6 @@ class TmdbScraper:
logger.info(f"正在生成季NFO文件{season_path.name}") logger.info(f"正在生成季NFO文件{season_path.name}")
doc = minidom.Document() doc = minidom.Document()
root = DomUtils.add_node(doc, doc, "season") root = DomUtils.add_node(doc, doc, "season")
# 添加时间
DomUtils.add_node(doc, root, "dateadded",
time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))
# 简介 # 简介
xplot = DomUtils.add_node(doc, root, "plot") xplot = DomUtils.add_node(doc, root, "plot")
xplot.appendChild(doc.createCDATASection(seasoninfo.get("overview") or "")) xplot.appendChild(doc.createCDATASection(seasoninfo.get("overview") or ""))
@ -306,8 +299,6 @@ class TmdbScraper:
logger.info(f"正在生成剧集NFO文件{file_path.name}") logger.info(f"正在生成剧集NFO文件{file_path.name}")
doc = minidom.Document() doc = minidom.Document()
root = DomUtils.add_node(doc, doc, "episodedetails") root = DomUtils.add_node(doc, doc, "episodedetails")
# 添加时间
DomUtils.add_node(doc, root, "dateadded", time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))
# TMDBID # TMDBID
uniqueid = DomUtils.add_node(doc, root, "uniqueid", str(episodeinfo.get("id"))) uniqueid = DomUtils.add_node(doc, root, "uniqueid", str(episodeinfo.get("id")))
uniqueid.setAttribute("type", "tmdb") uniqueid.setAttribute("type", "tmdb")