mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-16 17:30:43 +08:00
Compare commits
4 Commits
cdf826a742
...
ac716c1057
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac716c1057 | ||
|
|
46ec89d201 | ||
|
|
b06fc18062 | ||
|
|
5809871cf1 |
@ -179,4 +179,10 @@ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtow
|
||||
|
||||
程序没有任何破解行为,只是对于夸克已有的API进行封装,所有数据来自于夸克官方API;本人不对网盘内容负责、不对夸克官方API未来可能的变动导致的影响负责,请自行斟酌使用。
|
||||
|
||||
开源仅供学习与交流使用,未盈利也未授权商业使用,严禁用于非法用途。
|
||||
开源仅供学习与交流使用,未盈利也未授权商业使用,严禁用于非法用途。
|
||||
|
||||
## Sponsor
|
||||
|
||||
CDN acceleration and security protection for this project are sponsored by Tencent EdgeOne.
|
||||
|
||||
<a href="https://edgeone.ai/?from=github" target="_blank"><img title="Best Asian CDN, Edge, and Secure Solutions - Tencent EdgeOne" src="https://edgeone.ai/media/34fe3a45-492d-4ea4-ae5d-ea1087ca7b4b.png" width="300"></a>
|
||||
@ -195,6 +195,9 @@ class MagicRename:
|
||||
"八",
|
||||
"九",
|
||||
"十",
|
||||
"百",
|
||||
"千",
|
||||
"万",
|
||||
]
|
||||
|
||||
def __init__(self, magic_regex={}, magic_variable={}):
|
||||
@ -259,14 +262,14 @@ class MagicRename:
|
||||
"""自定义排序键"""
|
||||
for i, keyword in enumerate(self.priority_list):
|
||||
if keyword in name:
|
||||
return name.replace(keyword, f"{i:02d}") # 替换为数字,方便排序
|
||||
name = name.replace(keyword, f"_{i:02d}_") # 替换为数字,方便排序
|
||||
return name
|
||||
|
||||
def sort_file_list(self, file_list, dir_filename_dict={}):
|
||||
"""文件列表统一排序,给{I+}赋值"""
|
||||
filename_list = [
|
||||
# 强制加入`文件修改时间`字段供排序,效果:1无可排序字符时则按修改时间排序,2和目录已有文件重名时始终在其后
|
||||
f"{f['file_name_re']}{f['updated_at']}"
|
||||
f"{f['file_name_re']}_{f['updated_at']}"
|
||||
for f in file_list
|
||||
if f.get("file_name_re") and not f["dir"]
|
||||
]
|
||||
@ -289,7 +292,7 @@ class MagicRename:
|
||||
if file.get("file_name_re"):
|
||||
if match := re.search(r"\{I+\}", file["file_name_re"]):
|
||||
i = filename_index.get(
|
||||
f"{file['file_name_re']}{file['updated_at']}", 0
|
||||
f"{file['file_name_re']}_{file['updated_at']}", 0
|
||||
)
|
||||
file["file_name_re"] = re.sub(
|
||||
match.group(),
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
}
|
||||
},
|
||||
"magic_regex": {
|
||||
"$TV": {
|
||||
"$TV_REGEX": {
|
||||
"pattern": ".*?([Ss]\\d{1,2})?(?:[第EePpXx\\.\\-\\_\\( ]{1,2}|^)(\\d{1,3})(?!\\d).*?\\.(mp4|mkv)",
|
||||
"replace": "\\1E\\2.\\3"
|
||||
},
|
||||
@ -21,11 +21,11 @@
|
||||
"pattern": "^(?!.*纯享)(?!.*加更)(?!.*超前企划)(?!.*训练室)(?!.*蒸蒸日上).*",
|
||||
"replace": ""
|
||||
},
|
||||
"$SHOW_PRO": {
|
||||
"$SHOW_MAGIC": {
|
||||
"pattern": "^(?!.*纯享)(?!.*加更)(?!.*抢先)(?!.*预告).*?第\\d+期.*",
|
||||
"replace": "{II}.{TASKNAME}.{DATE}.第{E}期{PART}.{EXT}"
|
||||
},
|
||||
"$TV_PRO": {
|
||||
"$TV_MAGIC": {
|
||||
"pattern": "",
|
||||
"replace": "{TASKNAME}.{SXX}E{E}.{EXT}"
|
||||
}
|
||||
@ -35,7 +35,7 @@
|
||||
"taskname": "测试-魔法匹配剧集(这是一组有效分享,配置CK后可测试任务是否正常)",
|
||||
"shareurl": "https://pan.quark.cn/s/d07a34a9c695#/list/share/7e25ddd87cf64443b637125478733295-夸克自动转存测试",
|
||||
"savepath": "/夸克自动转存测试/剧集",
|
||||
"pattern": "$TV",
|
||||
"pattern": "$TV_REGEX",
|
||||
"replace": "",
|
||||
"enddate": "2099-01-30",
|
||||
"update_subdir": "4k|1080p"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user