mirror of
https://github.com/9001/copyparty.git
synced 2026-01-12 15:52:39 -07:00
xm: ignore upload-queue-empty
the message is sent by up2k when all uploads done; #949
This commit is contained in:
parent
867237d06a
commit
3f4b79ffb8
|
|
@ -34,7 +34,10 @@ MOUNT_BASE = b"/run/media/egon/"
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
try:
|
try:
|
||||||
label = sys.argv[1].split(":usb-eject:")[1].split(":")[0]
|
msg = sys.argv[1]
|
||||||
|
if msg.startswith("upload-queue-empty;"):
|
||||||
|
return
|
||||||
|
label = msg.split(":usb-eject:")[1].split(":")[0]
|
||||||
mp = MOUNT_BASE + unquote(label)
|
mp = MOUNT_BASE + unquote(label)
|
||||||
# print("ejecting [%s]... " % (mp,), end="")
|
# print("ejecting [%s]... " % (mp,), end="")
|
||||||
mp = os.path.abspath(os.path.realpath(mp))
|
mp = os.path.abspath(os.path.realpath(mp))
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,9 @@ def do_stuff(inf):
|
||||||
log = inf["log"]
|
log = inf["log"]
|
||||||
|
|
||||||
url = inf["txt"]
|
url = inf["txt"]
|
||||||
|
if url.startswith("upload-queue-empty;"):
|
||||||
|
return
|
||||||
|
|
||||||
if "://" not in url:
|
if "://" not in url:
|
||||||
url = "https://" + url
|
url = "https://" + url
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,9 @@ while you're in the /inc folder (or any folder below there)
|
||||||
def main():
|
def main():
|
||||||
inf = json.loads(sys.argv[1])
|
inf = json.loads(sys.argv[1])
|
||||||
url = inf["txt"]
|
url = inf["txt"]
|
||||||
|
if url.startswith("upload-queue-empty;"):
|
||||||
|
return
|
||||||
|
|
||||||
if "://" not in url:
|
if "://" not in url:
|
||||||
url = "https://" + url
|
url = "https://" + url
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue