本文整理汇总了Python中pyload.webui.PYLOAD.removeAccount方法的典型用法代码示例。如果您正苦于以下问题:Python PYLOAD.removeAccount方法的具体用法?Python PYLOAD.removeAccount怎么用?Python PYLOAD.removeAccount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyload.webui.PYLOAD
的用法示例。
在下文中一共展示了PYLOAD.removeAccount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: update_accounts
# 需要导入模块: from pyload.webui import PYLOAD [as 别名]
# 或者: from pyload.webui.PYLOAD import removeAccount [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)