feat: 调整新建/重建账号命名格式为 {上游网站名}-{上游分组名/ID}-{KeyID}
This commit is contained in:
@@ -22,6 +22,12 @@ from app.utils.number import fixed_decimal_string
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def build_imported_account_name(upstream_name: str, group_name: str | None, group_id: str, key_id: int) -> str:
|
||||
"""构建导入的账号名称:{上游网站名}-{上游分组名或分组ID}-{KeyID}"""
|
||||
grp = group_name if group_name else group_id
|
||||
return f"{upstream_name}-{grp}-{key_id}"
|
||||
|
||||
|
||||
PRIORITY_BASE = 1
|
||||
PRIORITY_STEP = 10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user