Files
iOSAI/Entity/Variables.py
2025-08-11 22:06:48 +08:00

27 lines
665 B
Python

import threading
from typing import Dict, Any
from Entity.AnchorModel import AnchorModel
tikTokApp = "com.zhiliaoapp.musically"
# wda apple bundle id
WdaAppBundleId = "com.vv.wda.xctrunner"
# 全局主播列表
anchorList: list[AnchorModel] = []
# 线程锁
anchorListLock = threading.Lock()
# 账号token
accountToken = None
# 安全删除数据
def removeModelFromAnchorList(model: AnchorModel):
with anchorListLock:
anchorList.remove(model)
# 添加数据
def addModelToAnchorList(models: list[Dict[str, Any]]):
with anchorListLock:
for dic in models:
obj = AnchorModel.dictToModel(dic)
anchorList.append(obj)