feat(fanart): 添加异步支持并优化图片处理逻辑

This commit is contained in:
Attente
2026-05-09 23:51:04 +08:00
committed by jxxghp
parent 4027ae2641
commit ee9ea54ab7
3 changed files with 209 additions and 71 deletions

View File

@@ -310,21 +310,6 @@ class MediaInfo:
if isinstance(self.type, str):
self.type = MediaType(self.type)
def set_image(self, name: str, image: str):
"""
设置图片地址
"""
setattr(self, f"{name}_path", image)
def get_image(self, name: str):
"""
获取图片地址
"""
try:
return getattr(self, f"{name}_path")
except AttributeError:
return None
def set_category(self, cat: str):
"""
设置二级分类