summaryrefslogtreecommitdiffstats
path: root/pyload/api/__init__.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-20 22:56:34 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-20 23:02:08 +0200
commit892b7cbd4981b764bed30b2ccc5ca73d791c39f2 (patch)
tree1f5f142ad7e21de9e88f0c15957bbc7e03a9d1ff /pyload/api/__init__.py
parentSpare code cosmetics (8) (diff)
downloadpyload-892b7cbd4981b764bed30b2ccc5ca73d791c39f2.tar.xz
Spare code cosmetics (9)
Diffstat (limited to 'pyload/api/__init__.py')
-rw-r--r--pyload/api/__init__.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/pyload/api/__init__.py b/pyload/api/__init__.py
index 1c292d541..442e9ef95 100644
--- a/pyload/api/__init__.py
+++ b/pyload/api/__init__.py
@@ -51,20 +51,20 @@ urlmatcher = re.compile(r"((https?|ftps?|xdcc|sftp):((//)|(\\\\))+[\w\d:#@%/;$()
class PERMS(object):
- ALL = 0 # requires no permission, but login
- ADD = 1 # can add packages
- DELETE = 2 # can delete packages
- STATUS = 4 # see and change server status
- LIST = 16 # see queue and collector
- MODIFY = 32 # moddify some attribute of downloads
- DOWNLOAD = 64 # can download from webinterface
- SETTINGS = 128 # can access settings
- ACCOUNTS = 256 # can access accounts
- LOGS = 512 # can see server logs
+ ALL = 0 #: requires no permission, but login
+ ADD = 1 #: can add packages
+ DELETE = 2 #: can delete packages
+ STATUS = 4 #: see and change server status
+ LIST = 16 #: see queue and collector
+ MODIFY = 32 #: moddify some attribute of downloads
+ DOWNLOAD = 64 #: can download from webinterface
+ SETTINGS = 128 #: can access settings
+ ACCOUNTS = 256 #: can access accounts
+ LOGS = 512 #: can see server logs
class ROLE(object):
- ADMIN = 0 # admin has all permissions implicit
+ ADMIN = 0 #: admin has all permissions implicit
USER = 1
@@ -86,7 +86,7 @@ class Api(Iface):
These can be configured via webinterface.
Admin user have all permissions, and are the only ones who can access the methods with no specific permission.
"""
- EXTERNAL = Iface # let the json api know which methods are external
+ EXTERNAL = Iface #: let the json api know which methods are external
def __init__(self, core):
@@ -149,7 +149,7 @@ class Api(Iface):
self.core.addonManager.dispatchEvent("config-changed", category, option, value, section)
if section == "core":
self.core.config[category][option] = value
- if option in ("limit_speed", "max_speed"): # not so nice to update the limit
+ if option in ("limit_speed", "max_speed"): #: not so nice to update the limit
self.core.requestFactory.updateBucket()
elif section == "plugin":
self.core.config.setPlugin(category, option, value)
@@ -232,7 +232,7 @@ class Api(Iface):
not self.core.threadManager.pause and self.isTimeDownload(),
self.core.config.get("reconnect", "activated") and self.isTimeReconnect())
for pyfile in [x.active for x in self.core.threadManager.threads if x.active and isinstance(x.active, PyFile)]:
- serverStatus.speed += pyfile.getSpeed() # bytes/s
+ serverStatus.speed += pyfile.getSpeed() #: bytes/s
return serverStatus
@@ -776,7 +776,7 @@ class Api(Iface):
order = {}
for pid in packs:
pack = self.core.files.getPackageData(int(pid))
- while pack['order'] in order.keys(): # just in case
+ while pack['order'] in order.keys(): #: just in case
pack['order'] += 1
order[pack['order']] = pack['id']
return order
@@ -792,7 +792,7 @@ class Api(Iface):
rawdata = self.core.files.getPackageData(int(pid))
order = {}
for id, pyfile in rawdata['links'].iteritems():
- while pyfile['order'] in order.keys(): # just in case
+ while pyfile['order'] in order.keys(): #: just in case
pyfile['order'] += 1
order[pyfile['order']] = pyfile['id']
return order