fix #2208 下载历史错误数据兼容

This commit is contained in:
jxxghp 2024-05-28 12:25:33 +08:00
parent dd40ef54c0
commit 0c6684a572

View File

@ -67,7 +67,10 @@ class TransferChain(ChainBase):
downloadhis: DownloadHistory = self.downloadhis.get_by_hash(torrent.hash) downloadhis: DownloadHistory = self.downloadhis.get_by_hash(torrent.hash)
if downloadhis: if downloadhis:
# 类型 # 类型
try:
mtype = MediaType(downloadhis.type) mtype = MediaType(downloadhis.type)
except ValueError:
mtype = MediaType.TV
# 按TMDBID识别 # 按TMDBID识别
mediainfo = self.recognize_media(mtype=mtype, mediainfo = self.recognize_media(mtype=mtype,
tmdbid=downloadhis.tmdbid, tmdbid=downloadhis.tmdbid,