feat(subscription): add membership access preflight

This commit is contained in:
chengma
2026-07-21 17:38:05 +08:00
parent ca46c34dfe
commit 9ee48dc2aa
14 changed files with 788 additions and 4 deletions
+17
View File
@@ -23,6 +23,7 @@ from .. import (
image_studio_generation,
image_studio_images,
product_status,
subscription,
)
from ..collect_skip import ALIAS_UNMATCHED, LOGIN_REQUIRED, empty_skip_reason_counts
from .widgets import *
@@ -34,6 +35,22 @@ _USER_LOG_PATH_RE = re.compile(
)
class SubscriptionCheckWorker(BaseWorker):
"""Fetch the current cmshopee account subscription away from the GUI thread."""
def __init__(self, *, config=None, cmhub_config_path=None):
super().__init__()
self.config = config
self.cmhub_config_path = cmhub_config_path
def execute(self):
result = subscription.check_status(
self.config,
cmhub_config_path=self.cmhub_config_path,
)
return {"subscription": result}
def _image_studio_step_label(step):
return {
"ensure_chrome": "准备账号浏览器",