diff --git a/backend/app/db.py b/backend/app/db.py index c80a3a4..dbc5152 100644 --- a/backend/app/db.py +++ b/backend/app/db.py @@ -15,7 +15,10 @@ _lock = threading.RLock() # Each Shorts channel is forced to exactly this many slots per Beijing day. SHORTS_DAILY_FORCE = 9 -TIKTOK_DAILY_FORCE = 9 +# TikTok official Content Posting / Direct Post guideline: +# "typically around 15 posts per day / creator account" +# https://developers.tiktok.com/doc/content-sharing-guidelines +TIKTOK_DAILY_FORCE = 15 def _force_daily_quota(value: Any = None) -> int: @@ -302,6 +305,10 @@ def init_db() -> None: "UPDATE shorts_channels SET daily_min = ?, daily_max = ?", (SHORTS_DAILY_FORCE, SHORTS_DAILY_FORCE), ) + conn.execute( + "UPDATE tiktok_channels SET daily_min = ?, daily_max = ?", + (TIKTOK_DAILY_FORCE, TIKTOK_DAILY_FORCE), + ) conn.commit() except Exception: pass diff --git a/frontend/src/app/tiktok/page.tsx b/frontend/src/app/tiktok/page.tsx index 78087c8..f8d72e8 100644 --- a/frontend/src/app/tiktok/page.tsx +++ b/frontend/src/app/tiktok/page.tsx @@ -462,9 +462,9 @@ export default function TikTokPage() { scheduled: 0, uploaded: 0, pending: 0, - gap: 9, + gap: 15, max_met: false, - daily_max: 9, + daily_max: 15, })); const seen = new Set(fromBoard.map((c) => c.id)); const extra = channels @@ -479,9 +479,9 @@ export default function TikTokPage() { scheduled: 0, uploaded: 0, pending: 0, - gap: 9, + gap: 15, max_met: false, - daily_max: 9, + daily_max: 15, })); return [...fromBoard, ...extra]; })(); @@ -995,12 +995,12 @@ export default function TikTokPage() {

账号配额({channels.length})

- 北京日 {beijingWindow || "—"} · 每账号 9 条/日 + 北京日 {beijingWindow || "—"} · 每账号 15 条/日(官方 Direct Post 约数)
{displayChannels.map((ch) => { const full = channels.find((x) => x.id === ch.id); - const pct = Math.min(100, Math.round(((ch.used || 0) / Math.max(1, ch.daily_max || 9)) * 100)); + const pct = Math.min(100, Math.round(((ch.used || 0) / Math.max(1, ch.daily_max || 15)) * 100)); return (