mirror of
https://github.com/9001/copyparty.git
synced 2025-12-08 06:03:29 -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():
|
||||
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)
|
||||
# print("ejecting [%s]... " % (mp,), end="")
|
||||
mp = os.path.abspath(os.path.realpath(mp))
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ def do_stuff(inf):
|
|||
log = inf["log"]
|
||||
|
||||
url = inf["txt"]
|
||||
if url.startswith("upload-queue-empty;"):
|
||||
return
|
||||
|
||||
if "://" not in url:
|
||||
url = "https://" + url
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ while you're in the /inc folder (or any folder below there)
|
|||
def main():
|
||||
inf = json.loads(sys.argv[1])
|
||||
url = inf["txt"]
|
||||
if url.startswith("upload-queue-empty;"):
|
||||
return
|
||||
|
||||
if "://" not in url:
|
||||
url = "https://" + url
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue