diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 17:20:59 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 17:20:59 +0200 |
commit | e00ef98491f79ae8aa972ae1473dae4a7b78c07e (patch) | |
tree | 31be0c7cdcebb61525bcc387bcf15d265a1c494a /pyload/cli/ManageFiles.py | |
parent | Fix except (diff) | |
download | pyload-e00ef98491f79ae8aa972ae1473dae4a7b78c07e.tar.xz |
Cleanup
Diffstat (limited to 'pyload/cli/ManageFiles.py')
-rw-r--r-- | pyload/cli/ManageFiles.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pyload/cli/ManageFiles.py b/pyload/cli/ManageFiles.py index ca1070113..3bf8d1686 100644 --- a/pyload/cli/ManageFiles.py +++ b/pyload/cli/ManageFiles.py @@ -22,6 +22,7 @@ class ManageFiles(Handler): self.links = None self.time = 0 + def onChar(self, char): if char in ("m", "d", "r"): self.mode = char @@ -33,12 +34,14 @@ class ManageFiles(Handler): self.pos += 5 self.backspace() + def onBackSpace(self): if not self.input and self.mode: self.mode = "" if not self.input and self.package > -1: self.package = -1 + def onEnter(self, input): if input == "0": self.cli.reset() @@ -74,6 +77,7 @@ class ManageFiles(Handler): self.mode = "" self.setInput() + def renderBody(self, line): if self.package < 0: println(line, white(_("Manage Packages:"))) @@ -131,6 +135,7 @@ class ManageFiles(Handler): println(line + 1, mag("0.") + _(" back to main menu")) return line + 2 + def getPackages(self): if self.cache and self.time + 2 < time(): return self.cache @@ -145,6 +150,7 @@ class ManageFiles(Handler): return data + def getLinks(self): if self.links and self.time + 1 < time(): return self.links @@ -156,6 +162,7 @@ class ManageFiles(Handler): self.time = time() return data + def parseInput(self, inp, package=True): inp = inp.strip() if "-" in inp: |