[Feature] let tencent upload-video --headed recover expired login in one command
Current behavior
At origin/main@9dc3cdb, upload_tencent_video() always calls:
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:
- checks the current account state;
- opens the QR login flow if the cookie is missing or expired;
- saves the refreshed account state;
- continues the same pending upload after login succeeds;
- returns a clear failure on login timeout/cancel without requiring the caller to implement its own
check -> login -> check -> upload -> retrystate 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