feat(p0): add favorite folder sync and sqlite data foundation
Implement P0 of the reaction dashboard: config loading with hot reload, SQLite migrations with backups, single-writer queue, read-only Bilibili fav client, folder import/diff sync, invalid-resource handling, blacklist seed, scheduler, and JSON redacted logging. Includes offline unit and transport-level contract tests; all existing and new tests pass.
This commit is contained in:
commit
e2cdf997af
39 files changed
+8575
No files matched your search
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"mid": 0,
|
||||
"csrf": "从 cookie 中的 bili_jct 取值",
|
||||
"cookie": "粘贴浏览器请求头里的完整 Cookie(需含 SESSDATA、bili_jct、DedeUserID 等)",
|
||||
"overrides": {},
|
||||
"sleep": {
|
||||
"min": 2.5,
|
||||
"max": 7.5,
|
||||
"long_every_min": 20,
|
||||
"long_every_max": 40,
|
||||
"long_min": 30,
|
||||
"long_max": 90,
|
||||
"retry_wait": 45
|
||||
},
|
||||
"telegram": {
|
||||
"enabled": false,
|
||||
"bot_token": "replace-with-telegram-bot-token",
|
||||
"chat_id": 0
|
||||
},
|
||||
"web": {
|
||||
"host": "127.0.0.1",
|
||||
"port": 8080,
|
||||
"auth_token": "replace-with-a-long-random-token",
|
||||
"public_base_url": ""
|
||||
},
|
||||
"storage": {
|
||||
"database_path": "data/app.db",
|
||||
"backup_dir": "data/backup",
|
||||
"backup_keep_days": 14
|
||||
},
|
||||
"folders": [
|
||||
{ "year": 2025, "media_id": 4451053851, "title": "咻咻满-reaction-2025" },
|
||||
{ "year": 2026, "media_id": 3700023351, "title": "咻咻满 reaction 合集" }
|
||||
],
|
||||
"track_fans": [37754047],
|
||||
"up_blacklist_seed": [
|
||||
261052419,
|
||||
1908537643,
|
||||
1701121088,
|
||||
542262,
|
||||
376316958,
|
||||
145178393,
|
||||
66389997,
|
||||
293976264,
|
||||
3026109
|
||||
],
|
||||
"schedule": {
|
||||
"discover_minutes": 60,
|
||||
"folder_sync_minutes": 60,
|
||||
"full_folder_refresh_hours": 6,
|
||||
"snapshot_at": "00:01",
|
||||
"candidate_ttl_days": 7
|
||||
},
|
||||
"notify": {
|
||||
"min_score": 2,
|
||||
"max_items_per_message": 10
|
||||
},
|
||||
"classify": {
|
||||
"require_title": "咻咻满",
|
||||
"positive": [
|
||||
"reaction",
|
||||
"re",
|
||||
"反应",
|
||||
"看",
|
||||
"听",
|
||||
"初听",
|
||||
"首次",
|
||||
"点评",
|
||||
"锐评",
|
||||
"路人",
|
||||
"震惊",
|
||||
"双人"
|
||||
],
|
||||
"charge": ["充电", "加急", "专场"],
|
||||
"negative": ["歌切", "切片", "纯享", "搬运", "完整版"],
|
||||
"duration_boost": { "gt_30min": 1, "gt_60min": 2 }
|
||||
},
|
||||
"heat_weights": {
|
||||
"view": 0.3,
|
||||
"like": 0.2,
|
||||
"coin": 0.2,
|
||||
"favorite": 0.15,
|
||||
"share": 0.1,
|
||||
"reply": 0.03,
|
||||
"danmaku": 0.02
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user