[Feature] let tencent upload-video --headed recover expired login in one command

Author: oscarLeoyCreated Aug 19, 2026Updated Aug 19, 2026

Current behavior

At origin/main@9dc3cdb, upload_tencent_video() always calls:

python
is_ready = await tencent_setup(str(account_file), handle=False)

When the cookie is missing or expired, sau tencent upload-video --headed ... exits and asks the caller to run a separate sau tencent login command first. The --headed upload command therefore cannot recover authentication and continue the pending upload itself.

Requested behavior

For headed uploads, please provide an official one-command flow that:

  1. checks the current account state;
  2. opens the QR login flow if the cookie is missing or expired;
  3. saves the refreshed account state;
  4. continues the same pending upload after login succeeds;
  5. returns a clear failure on login timeout/cancel without requiring the caller to implement its own check -> login -> check -> upload -> retry state machine.

A possible CLI contract is for tencent upload-video --headed to own that recovery directly. An equivalent official flag would also work.

Why

Keeping authentication recovery inside the uploader avoids duplicate state machines and prevents a successful QR scan in one process from becoming disconnected from the pending upload in another process.

Source: dreammis/social-auto-upload