This commit is contained in:
ed 2025-01-22 23:26:17 +00:00
parent 1231ce199e
commit c4cbc32cc5
5 changed files with 58 additions and 3 deletions

View file

@ -740,6 +740,10 @@ def get_sects():
the \033[33m,,\033[35m stops copyparty from reading the rest as flags and the \033[33m,,\033[35m stops copyparty from reading the rest as flags and
the \033[33m--\033[35m stops notify-send from reading the message as args the \033[33m--\033[35m stops notify-send from reading the message as args
and the alert will be "hey" followed by the messagetext and the alert will be "hey" followed by the messagetext
\033[36m--xau zmq:pub:tcp://*:5556\033[35m announces uploads on zeromq;
\033[36m--xau t3,zmq:push:tcp://*:5557\033[35m also works, and you can
\033[36m--xau t3,j,zmq:req:tcp://localhost:5555\033[35m too for example
\033[0m \033[0m
each hook is executed once for each event, except for \033[36mxiu\033[0m each hook is executed once for each event, except for \033[36mxiu\033[0m
which builds up a backlog of uploads, running the hook just once which builds up a backlog of uploads, running the hook just once

View file

@ -1,8 +1,8 @@
# coding: utf-8 # coding: utf-8
VERSION = (1, 16, 8) VERSION = (1, 16, 9)
CODENAME = "COPYparty" CODENAME = "COPYparty"
BUILD_DT = (2025, 1, 11) BUILD_DT = (2025, 1, 22)
S_VERSION = ".".join(map(str, VERSION)) S_VERSION = ".".join(map(str, VERSION))
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT) S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)

View file

@ -795,7 +795,7 @@ class Up2k(object):
continue continue
self.log("xiu: %d# %r" % (len(wrfs), cmd)) self.log("xiu: %d# %r" % (len(wrfs), cmd))
runihook(self.log, cmd, vol, ups) runihook(self.log, self.args.hook_v, cmd, vol, ups)
def _vis_job_progress(self, job: dict[str, Any]) -> str: def _vis_job_progress(self, job: dict[str, Any]) -> str:
perc = 100 - (len(job["need"]) * 100.0 / (len(job["hash"]) or 1)) perc = 100 - (len(job["need"]) * 100.0 / (len(job["hash"]) or 1))

View file

@ -3406,6 +3406,7 @@ def _parsehook(
def runihook( def runihook(
log: Optional["NamedLogger"], log: Optional["NamedLogger"],
verbose: bool,
cmd: str, cmd: str,
vol: "VFS", vol: "VFS",
ups: list[tuple[str, int, int, str, str, str, int]], ups: list[tuple[str, int, int, str, str, str, int]],
@ -3435,6 +3436,17 @@ def runihook(
else: else:
sp_ka["sin"] = b"\n".join(fsenc(x) for x in aps) sp_ka["sin"] = b"\n".join(fsenc(x) for x in aps)
if acmd[0].startswith("zmq:"):
try:
msg = sp_ka["sin"].decode("utf-8", "replace")
_zmq_hook(log, verbose, "xiu", acmd[0][4:].lower(), msg, wait, sp_ka)
if verbose and log:
log("hook(xiu) %r OK" % (cmd,), 6)
except Exception as ex:
if log:
log("zeromq failed: %r" % (ex,))
return True
t0 = time.time() t0 = time.time()
if fork: if fork:
Daemon(runcmd, cmd, bcmd, ka=sp_ka) Daemon(runcmd, cmd, bcmd, ka=sp_ka)

View file

@ -1,3 +1,42 @@
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
# 2025-0111-1611 `v1.16.8` android boost
## 🧪 new features
* 10x faster file hashing in android-chrome ec507889
* on a recent pixel, speed went from 13 to 139 MiB/s
* android's sandboxing makes small reads expensive, so do bigger reads instead
* so the browser-tab will use more RAM on android now, maybe around 200 MiB
* this only affects chrome-based browsers on android, not firefox
* PUT/multipart uploads: request-header `Accept: json` makes it return json instead of html, just like `?j` ce0e5be4
* add config examples for [ishare](https://isharemac.app/), a MacOS screenshot utility inspired by ShareX 0c0d6b2b
* also includes a bug-workaround for [ishare#107](https://github.com/castdrian/ishare/issues/107) - copyparty will now include a toplevel json property `fileurl` in the response if exactly one file was uploaded
* the [connect-page](https://a.ocv.me/?hc) generates an appropriate `copyparty.iscu` for ishare; [it looks like this](https://github.com/user-attachments/assets/820730ad-2319-4912-8eb2-733755a4cf54)
## 🩹 bugfixes
* fix a potential upload deadlock when...
* ...the database (`-e2d`) is **not** enabled for any volume, and...
* ...either the shares feature, or user-changeable passwords, is enabled 9e542cf8
* when loading the partial-uploads registry on startup, a cosmetic desync could occur 467acb47
## 🔧 other changes
* remove some deprecated properties in partial-upload metadata aa2a8fa2
* v1.15.7 is now the oldest version which still has any chance of reading a modern up2k.snap
* #129 added howto: [using webdav when copyparty is behind IdP](https://github.com/9001/copyparty/blob/hovudstraum/docs/idp.md#connecting-webdav-clients) -- thanks @wuast94 !
* added howto: [install copyparty on a synology nas](https://github.com/9001/copyparty/blob/hovudstraum/docs/synology-dsm.md) 21f93042
* more examples in the connect-page: 278258ee fb139697
* config-file for sharex on windows
* config-file for ishare on macos
* script for flameshot on linux
* #75 add recommendation to use the [kamelåså project](https://github.com/steinuil/kameloso) instead of copyparty's [very-bad-idea.py](https://github.com/9001/copyparty/tree/hovudstraum/bin/mtag#dangerous-plugins) 9f84dc42
* more reverse-proxy examples (haproxy, lighttpd, traefik, caddy) and improved nginx performance ac0a2da3
* readme has a [performance comparison](https://github.com/9001/copyparty?tab=readme-ov-file#reverse-proxy-performance) -- `haproxy > caddy > traefik > nginx > apache > lighttpd`
* copyparty.exe: updated pillow 244e952f
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
# 2024-1223-0005 `v1.16.7` an idp fix for xmas # 2024-1223-0005 `v1.16.7` an idp fix for xmas