更新测试
This commit is contained in:
parent
5856864f52
commit
2b0d9360aa
8
main.py
8
main.py
@ -6,6 +6,7 @@ import threading
|
|||||||
import colorlog
|
import colorlog
|
||||||
from pikpakFs import PKFs, IsDir, IsFile, PKTaskStatus
|
from pikpakFs import PKFs, IsDir, IsFile, PKTaskStatus
|
||||||
import os
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
def setup_logging():
|
def setup_logging():
|
||||||
formatter = colorlog.ColoredFormatter(
|
formatter = colorlog.ColoredFormatter(
|
||||||
@ -275,6 +276,13 @@ class Console(cmd2.Cmd):
|
|||||||
for task in tasks:
|
for task in tasks:
|
||||||
await self.AsyncPrint(f"{task.id}: {task.status.name}")
|
await self.AsyncPrint(f"{task.id}: {task.status.name}")
|
||||||
|
|
||||||
|
def print_debug(self, jsonObject):
|
||||||
|
logging.debug(json.dumps(jsonObject, indent=4))
|
||||||
|
|
||||||
|
@RunSync
|
||||||
|
async def do_test(self, args):
|
||||||
|
self.print_debug(await Client.client.offline_list())
|
||||||
|
|
||||||
async def mainLoop():
|
async def mainLoop():
|
||||||
global MainLoop, Client
|
global MainLoop, Client
|
||||||
MainLoop = asyncio.get_running_loop()
|
MainLoop = asyncio.get_running_loop()
|
||||||
|
98
readme.md
98
readme.md
@ -8,4 +8,100 @@ Todo:
|
|||||||
- [x] 异步输出频率过高会导致卡死,似乎会多创建一个线程
|
- [x] 异步输出频率过高会导致卡死,似乎会多创建一个线程
|
||||||
- [ ] 实现Task队列管理
|
- [ ] 实现Task队列管理
|
||||||
- [ ] 自动刷新文件系统缓存
|
- [ ] 自动刷新文件系统缓存
|
||||||
- [ ] 分析以下方法的返回值:offline_file_info、offline_list、offline_task_retry、delete_tasks
|
- [ ] 分析以下方法的返回值:offline_file_info、offline_list
|
||||||
|
|
||||||
|
|
||||||
|
### 记录
|
||||||
|
1. offline_download
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"upload_type": "UPLOAD_TYPE_URL",
|
||||||
|
"url": {
|
||||||
|
"kind": "upload#url"
|
||||||
|
},
|
||||||
|
"task": {
|
||||||
|
"kind": "drive#task",
|
||||||
|
"id": "VOAMocJorcA09bRr-3bEDUbYo1",
|
||||||
|
"name": "[FLsnow][Genshiken-2daime][BDRip]",
|
||||||
|
"type": "offline",
|
||||||
|
"user_id": "ZEBRT8Wc1IzU1rfZ",
|
||||||
|
"statuses": [],
|
||||||
|
"status_size": 56,
|
||||||
|
"params": {
|
||||||
|
"predict_speed": "73300775185",
|
||||||
|
"predict_type": "3"
|
||||||
|
},
|
||||||
|
"file_id": "VOAMocKArcA09bRr-3bEDUbZo1",
|
||||||
|
"file_name": "[FLsnow][Genshiken-2daime][BDRip]",
|
||||||
|
"file_size": "29071069771",
|
||||||
|
"message": "Saving",
|
||||||
|
"created_time": "2024-10-29T18:29:11.092+08:00",
|
||||||
|
"updated_time": "2024-10-29T18:29:11.092+08:00",
|
||||||
|
"third_task_id": "",
|
||||||
|
"phase": "PHASE_TYPE_RUNNING",
|
||||||
|
"progress": 0,
|
||||||
|
"icon_link": "",
|
||||||
|
"callback": "",
|
||||||
|
"space": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2. offline_file_info
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"kind": "drive#folder",
|
||||||
|
"id": "VOAMocKArcA09bRr-3bEDUbZo1",
|
||||||
|
"parent_id": "VNTQEPvYTRlbqP1pB2YGZorwo1",
|
||||||
|
"name": "[FLsnow][Genshiken-2daime][BDRip](1)",
|
||||||
|
"user_id": "ZEBRT8Wc1IzU1rfZ",
|
||||||
|
"size": "0",
|
||||||
|
"revision": "0",
|
||||||
|
"file_extension": "",
|
||||||
|
"mime_type": "",
|
||||||
|
"starred": false,
|
||||||
|
"web_content_link": "",
|
||||||
|
"created_time": "2024-10-29T18:29:13.251+08:00",
|
||||||
|
"modified_time": "2024-10-29T18:29:13.251+08:00",
|
||||||
|
"icon_link": "https://static.mypikpak.com/7d6933d5cde34f200366685cba0cbc4592cfd363",
|
||||||
|
"thumbnail_link": "https://sg-thumbnail-drive.mypikpak.com/v0/screenshot-thumbnails/788AB60820B162FD988606CE988FBC40B8C6EA8D/720/2048",
|
||||||
|
"md5_checksum": "",
|
||||||
|
"hash": "",
|
||||||
|
"links": {},
|
||||||
|
"phase": "PHASE_TYPE_COMPLETE",
|
||||||
|
"audit": {
|
||||||
|
"status": "STATUS_OK",
|
||||||
|
"message": "Normal resource",
|
||||||
|
"title": ""
|
||||||
|
},
|
||||||
|
"medias": [],
|
||||||
|
"trashed": false,
|
||||||
|
"delete_time": "",
|
||||||
|
"original_url": "",
|
||||||
|
"params": {
|
||||||
|
"platform_icon": "https://static.mypikpak.com/21ecdc2c6b2372cdee91b193df9a6248b885a1b0",
|
||||||
|
"small_thumbnail": "https://sg-thumbnail-drive.mypikpak.com/v0/screenshot-thumbnails/788AB60820B162FD988606CE988FBC40B8C6EA8D/240/720",
|
||||||
|
"url": "magnet:?xt=urn:btih:7c0e7e3e3828c22b49e903beefcee69ec2a4986e"
|
||||||
|
},
|
||||||
|
"original_file_index": 0,
|
||||||
|
"space": "",
|
||||||
|
"apps": [],
|
||||||
|
"writable": true,
|
||||||
|
"folder_type": "NORMAL",
|
||||||
|
"sort_name": "",
|
||||||
|
"user_modified_time": "2024-10-29T18:29:13.251+08:00",
|
||||||
|
"spell_name": [],
|
||||||
|
"file_category": "OTHER",
|
||||||
|
"tags": [],
|
||||||
|
"reference_events": []
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
3. offline_list
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tasks": [],
|
||||||
|
"next_page_token": "",
|
||||||
|
"expires_in": 10
|
||||||
|
}
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user