summaryrefslogtreecommitdiffstats
path: root/pyload/cli/ManageFiles.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/cli/ManageFiles.py')
-rw-r--r--pyload/cli/ManageFiles.py7
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: