本文整理匯總了Python中pyload.webui.PYLOAD.updateAccount方法的典型用法代碼示例。如果您正苦於以下問題:Python PYLOAD.updateAccount方法的具體用法?Python PYLOAD.updateAccount怎麽用?Python PYLOAD.updateAccount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pyload.webui.PYLOAD
的用法示例。
在下文中一共展示了PYLOAD.updateAccount方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: update_accounts
# 需要導入模塊: from pyload.webui import PYLOAD [as 別名]
# 或者: from pyload.webui.PYLOAD import updateAccount [as 別名]
def update_accounts():
deleted = [] #: dont update deleted accs or they will be created again
for name, value in request.POST.iteritems():
value = value.strip()
if not value: continue
tmp, user = name.split(";")
plugin, action = tmp.split("|")
if (plugin, user) in deleted: continue
if action == "password":
PYLOAD.updateAccount(plugin, user, value)
elif action == "time" and "-" in value:
PYLOAD.updateAccount(plugin, user, options={"time": [value]})
elif action == "limitdl" and value.isdigit():
PYLOAD.updateAccount(plugin, user, options={"limitDL": [value]})
elif action == "delete":
deleted.append((plugin,user))
PYLOAD.removeAccount(plugin, user)
示例2: add_account
# 需要導入模塊: from pyload.webui import PYLOAD [as 別名]
# 或者: from pyload.webui.PYLOAD import updateAccount [as 別名]
def add_account():
login = request.POST['account_login']
password = request.POST['account_password']
type = request.POST['account_type']
PYLOAD.updateAccount(type, login, password)