kannibalox / PtpUploader

PtpUploader is a bot that automatically uploads releases to PTP.
69 stars 21 forks source link

hook #16

Closed daomengRen closed 2 years ago

daomengRen commented 2 years ago

hook: on_upload:

could you please add an example for this, I don't know how to use it,thanks

kannibalox commented 2 years ago

i've added an example here: https://github.com/kannibalox/PtpUploader/blob/main/src/PtpUploader/config.default.yml#L114, give it a shot

daomengRen commented 2 years ago

does this mean that I can also execute bash or python scripts, also for the available fields, can you give a list, I didn't find the UploadedTorrentUrl field in ReleaseInfo.py

kannibalox commented 2 years ago

UploadedTorrentUrl is the only outlier (it's just there for convenience), everything else is taken directly from ReleaseInfo.py. The command gets sent /bin/sh, which means you can run pretty much anything you have permissions to.

daomengRen commented 2 years ago

the properties under each class of ReleaseInfo.py are available fields, is that what I think

kannibalox commented 2 years ago

Correct, sorry if that wasn't clear.

daomengRen commented 2 years ago

It's ok, I'll try each one more, thanks a lot