fix
This commit is contained in:
parent
bd4c639761
commit
e6af2c0f34
@ -190,7 +190,7 @@ docker pull jxxghp/moviepilot:latest
|
|||||||
> `year`: 年份
|
> `year`: 年份
|
||||||
> `resourceType`:资源类型
|
> `resourceType`:资源类型
|
||||||
> `effect`:特效
|
> `effect`:特效
|
||||||
> `edition`: 版本(资源类型+特效)
|
> `edition`: 版本(资源类型+特效)
|
||||||
> `videoFormat`: 分辨率
|
> `videoFormat`: 分辨率
|
||||||
> `releaseGroup`: 制作组/字幕组
|
> `releaseGroup`: 制作组/字幕组
|
||||||
> `videoCodec`: 视频编码
|
> `videoCodec`: 视频编码
|
||||||
|
@ -146,15 +146,15 @@ class AutoClean(_PluginBase):
|
|||||||
history = self.get_data('history') or []
|
history = self.get_data('history') or []
|
||||||
|
|
||||||
# 创建一个字典来保存分组结果
|
# 创建一个字典来保存分组结果
|
||||||
downloadhis_grouped_dict = defaultdict(list)
|
downloadhis_grouped_dict: Dict[tuple, List[DownloadHistory]] = defaultdict(list)
|
||||||
# 遍历DownloadHistory对象列表
|
# 遍历DownloadHistory对象列表
|
||||||
for downloadhis in downloadhis_list:
|
for downloadhis in downloadhis_list:
|
||||||
# 获取type和tmdbid的值
|
# 获取type和tmdbid的值
|
||||||
type = downloadhis.type
|
dtype = downloadhis.type
|
||||||
tmdbid = downloadhis.tmdbid
|
tmdbid = downloadhis.tmdbid
|
||||||
|
|
||||||
# 将DownloadHistory对象添加到对应分组的列表中
|
# 将DownloadHistory对象添加到对应分组的列表中
|
||||||
downloadhis_grouped_dict[(type, tmdbid)].append(downloadhis)
|
downloadhis_grouped_dict[(dtype, tmdbid)].append(downloadhis)
|
||||||
|
|
||||||
# 输出分组结果
|
# 输出分组结果
|
||||||
for key, downloadhis_list in downloadhis_grouped_dict.items():
|
for key, downloadhis_list in downloadhis_grouped_dict.items():
|
||||||
|
@ -158,15 +158,16 @@ class NAStoolSync(_PluginBase):
|
|||||||
|
|
||||||
# 替换value
|
# 替换value
|
||||||
if isinstance(plugin_value, str):
|
if isinstance(plugin_value, str):
|
||||||
plugin_value = json.loads(plugin_value)
|
_value: dict = json.loads(plugin_value)
|
||||||
if str(plugin_value.get("to_download")).isdigit() and int(
|
elif isinstance(plugin_value, dict):
|
||||||
plugin_value.get("to_download")) == int(sub_downloaders[0]):
|
if str(plugin_value.get("to_download")).isdigit() and int(
|
||||||
plugin_value["to_download"] = sub_downloaders[1]
|
plugin_value.get("to_download")) == int(sub_downloaders[0]):
|
||||||
|
plugin_value["to_download"] = sub_downloaders[1]
|
||||||
|
|
||||||
# 替换辅种记录
|
# 替换辅种记录
|
||||||
if str(plugin_id) == "IYUUAutoSeed":
|
if str(plugin_id) == "IYUUAutoSeed":
|
||||||
if isinstance(plugin_value, str):
|
if isinstance(plugin_value, str):
|
||||||
plugin_value = json.loads(plugin_value)
|
plugin_value: list = json.loads(plugin_value)
|
||||||
if not isinstance(plugin_value, list):
|
if not isinstance(plugin_value, list):
|
||||||
plugin_value = [plugin_value]
|
plugin_value = [plugin_value]
|
||||||
for value in plugin_value:
|
for value in plugin_value:
|
||||||
|
@ -36,6 +36,12 @@ class DownloadHistory(BaseModel):
|
|||||||
torrent_description: Optional[str] = None
|
torrent_description: Optional[str] = None
|
||||||
# 站点
|
# 站点
|
||||||
torrent_site: Optional[str] = None
|
torrent_site: Optional[str] = None
|
||||||
|
# 下载用户
|
||||||
|
userid: Optional[str] = None
|
||||||
|
# 下载渠道
|
||||||
|
channel: Optional[str] = None
|
||||||
|
# 创建时间
|
||||||
|
date: Optional[str] = None
|
||||||
# 备注
|
# 备注
|
||||||
note: Optional[str] = None
|
note: Optional[str] = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user