Merge pull request #688 from thsrite/main

feat 定时清理媒体库插件
This commit is contained in:
jxxghp
2023-09-28 15:46:13 +08:00
committed by GitHub
10 changed files with 642 additions and 7 deletions

View File

@ -1,6 +1,7 @@
import base64
import json
import re
import time
from pathlib import Path
from typing import List, Optional, Tuple, Set, Dict, Union
@ -269,7 +270,9 @@ class DownloadChain(ChainBase):
torrent_name=_torrent.title,
torrent_description=_torrent.description,
torrent_site=_torrent.site_name,
userid=userid
userid=userid,
channel=channel.value if channel else None,
date=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
)
# 登记下载文件
@ -321,7 +324,7 @@ class DownloadChain(ChainBase):
contexts: List[Context],
no_exists: Dict[int, Dict[int, NotExistMediaInfo]] = None,
save_path: str = None,
channel: str = None,
channel: MessageChannel = None,
userid: str = None) -> Tuple[List[Context], Dict[int, Dict[int, NotExistMediaInfo]]]:
"""
根据缺失数据,自动种子列表中组合择优下载

View File

@ -187,7 +187,7 @@ class MessageChain(ChainBase):
# 下载种子
context: Context = cache_list[int(text) - 1]
# 下载
self.downloadchain.download_single(context, userid=userid)
self.downloadchain.download_single(context, userid=userid, channel=channel)
elif text.lower() == "p":
# 上一页