fix download

This commit is contained in:
jxxghp 2023-07-08 16:37:27 +08:00
parent 5ceaf94169
commit 668cfb72c3

View File

@ -168,7 +168,9 @@ class MediaInfo:
从字典中初始化 从字典中初始化
""" """
for key, value in data.items(): for key, value in data.items():
setattr(self, key, value) attr = getattr(self, key, None)
if attr and not isinstance(attr, property):
setattr(self, key, value)
if isinstance(self.type, str): if isinstance(self.type, str):
self.type = MediaType(self.type) self.type = MediaType(self.type)