From 6f75b02723a7962c5373a6b3c1e9150d96ff170d Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 12 Jul 2022 03:16:30 +0200 Subject: [PATCH] misc --- contrib/plugins/README.md | 2 ++ contrib/plugins/up2k-hook-ytid.js | 2 +- copyparty/up2k.py | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/README.md b/contrib/plugins/README.md index e59d2ae7..630cf74f 100644 --- a/contrib/plugins/README.md +++ b/contrib/plugins/README.md @@ -15,6 +15,8 @@ save one of these as `.epilogue.html` inside a folder to customize it: point `--js-browser` to one of these by URL: * [`minimal-up2k.js`](minimal-up2k.js) is similar to the above `minimal-up2k.html` except it applies globally to all write-only folders +* [`up2k-hooks.js`](up2k-hooks.js) lets you specify a ruleset for files to skip uploading + * [`up2k-hook-ytid.js`](up2k-hook-ytid.js) is a more specific example checking youtube-IDs against some API diff --git a/contrib/plugins/up2k-hook-ytid.js b/contrib/plugins/up2k-hook-ytid.js index 38b16ecd..86255534 100644 --- a/contrib/plugins/up2k-hook-ytid.js +++ b/contrib/plugins/up2k-hook-ytid.js @@ -1,6 +1,6 @@ // way more specific example -- // assumes all files dropped into the uploader have a youtube-id somewhere in the filename, -// locates the youtube-ids and passes them to an API which returns a list of IDS which should be uploaded +// locates the youtube-ids and passes them to an API which returns a list of IDs which should be uploaded // // assumes copyparty is behind nginx as /ytq is a standalone service which must be rproxied in place diff --git a/copyparty/up2k.py b/copyparty/up2k.py index 145197bc..ec1b1ad8 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -526,7 +526,9 @@ class Up2k(object): if vpath: vpath += "/" - self.log("/{} {}".format(vpath, " ".join(sorted(a))), "35") + zs = " ".join(sorted(a)) + zs = zs.replace("30mre.compile(", "30m(") # nohash + self.log("/{} {}".format(vpath, zs), "35") reg = {} drp = None