diff --git a/bin/hooks/README.md b/bin/hooks/README.md index df9ad84f..4d977694 100644 --- a/bin/hooks/README.md +++ b/bin/hooks/README.md @@ -2,7 +2,7 @@ standalone programs which are executed by copyparty when an event happens (uploa these programs either take zero arguments, or a filepath (the affected file), or a json message with filepath + additional info -run copyparty with `--help-hooks` for usage details / hook type explanations (xbu/xau/xiu/xbr/xar/xbd/xad) +run copyparty with `--help-hooks` for usage details / hook type explanations (xm/xbu/xau/xiu/xbr/xar/xbd/xad/xban) > **note:** in addition to event hooks (the stuff described here), copyparty has another api to run your programs/scripts while providing way more information such as audio tags / video codecs / etc and optionally daisychaining data between scripts in a processing pipeline; if that's what you want then see [mtp plugins](../mtag/) instead diff --git a/bin/hooks/qbittorrent-magnet.py b/bin/hooks/qbittorrent-magnet.py index fb5daebe..430b4b76 100755 --- a/bin/hooks/qbittorrent-magnet.py +++ b/bin/hooks/qbittorrent-magnet.py @@ -23,17 +23,18 @@ because the keyword "anime" is in the DESTS config below needs python3 example usage as global config (not a good idea): - python copyparty-sfx.py --xm f,j,t60,bin/hooks/qbittorrent-magnet.py + python copyparty-sfx.py --xm aw,f,j,t60,bin/hooks/qbittorrent-magnet.py parameters explained, xm = execute on message (📟) + aw = only users with write-access can use this f = fork; don't delay other hooks while this is running j = provide message information as json (not just the text) t60 = abort if qbittorrent has to think about it for more than 1 min example usage as a volflag (per-volume config, much better): - -v srv/qb:qb:A,ed:c,xm=f,j,t60,bin/hooks/qbittorrent-magnet.py - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + -v srv/qb:qb:A,ed:c,xm=aw,f,j,t60,bin/hooks/qbittorrent-magnet.py + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (share filesystem-path srv/qb as volume /qb with Admin for user 'ed', running this plugin on all messages with the params explained above) @@ -44,7 +45,7 @@ example usage as a volflag in a copyparty config file: accs: A: ed flags: - xm: f,j,t60,bin/hooks/qbittorrent-magnet.py + xm: aw,f,j,t60,bin/hooks/qbittorrent-magnet.py the volflag examples only kicks in if you send the torrent magnet while you're in the /qb folder (or any folder below there) diff --git a/bin/hooks/wget.py b/bin/hooks/wget.py index 973f9346..ad0c71c0 100755 --- a/bin/hooks/wget.py +++ b/bin/hooks/wget.py @@ -12,18 +12,19 @@ application/x-www-form-urlencoded (for example using the 📟 message-to-server-log in the web-ui) example usage as global config: - --xm f,j,t3600,bin/hooks/wget.py + --xm aw,f,j,t3600,bin/hooks/wget.py parameters explained, xm = execute on message-to-server-log + aw = only users with write-access can use this f = fork; don't delay other hooks while this is running j = provide message information as json (not just the text) c3 = mute all output t3600 = timeout and abort download after 1 hour example usage as a volflag (per-volume config): - -v srv/inc:inc:r:rw,ed:c,xm=f,j,t3600,bin/hooks/wget.py - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + -v srv/inc:inc:r:rw,ed:c,xm=aw,f,j,t3600,bin/hooks/wget.py + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (share filesystem-path srv/inc as volume /inc, readable by everyone, read-write for user 'ed', @@ -36,7 +37,7 @@ example usage as a volflag in a copyparty config file: r: * rw: ed flags: - xm: f,j,t3600,bin/hooks/wget.py + xm: aw,f,j,t3600,bin/hooks/wget.py the volflag examples only kicks in if you send the message while you're in the /inc folder (or any folder below there)