mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
add plaintext volume listing
This commit is contained in:
parent
ececdad22d
commit
ac6c4b13f5
|
@ -1732,6 +1732,31 @@ class HttpCli(object):
|
||||||
vstate = {}
|
vstate = {}
|
||||||
vs = {"scanning": None, "hashq": None, "tagq": None, "mtpq": None}
|
vs = {"scanning": None, "hashq": None, "tagq": None, "mtpq": None}
|
||||||
|
|
||||||
|
if self.uparam.get("ls") in ["v", "t", "txt"]:
|
||||||
|
if self.uname == "*":
|
||||||
|
txt = "howdy stranger (you're not logged in)"
|
||||||
|
else:
|
||||||
|
txt = "welcome back {}".format(self.uname)
|
||||||
|
|
||||||
|
if vstate:
|
||||||
|
txt += "\nstatus:"
|
||||||
|
for k in ["scanning", "hashq", "tagq", "mtpq"]:
|
||||||
|
txt += " {}({})".format(k, vs[k])
|
||||||
|
|
||||||
|
if rvol:
|
||||||
|
txt += "\nyou can browse:"
|
||||||
|
for v in rvol:
|
||||||
|
txt += "\n " + v
|
||||||
|
|
||||||
|
if wvol:
|
||||||
|
txt += "\nyou can upload to:"
|
||||||
|
for v in wvol:
|
||||||
|
txt += "\n " + v
|
||||||
|
|
||||||
|
txt = txt.encode("utf-8", "replace") + b"\n"
|
||||||
|
self.reply(txt, mime="text/plain; charset=utf-8")
|
||||||
|
return True
|
||||||
|
|
||||||
html = self.j2(
|
html = self.j2(
|
||||||
"splash",
|
"splash",
|
||||||
this=self,
|
this=self,
|
||||||
|
|
Loading…
Reference in a new issue