How to automatically upload with gdrive / megacmd after finishing download

somus1735

Member
May 25, 2018
833
0
16
Hello.

I really can't find any documentation I can understand, just code snippets and I can't get them to work when modifying them.

I want all torrents to be uploaded to Google Drive using the gdrive or megacmd command line tool (it works in general): https://github.com/prasmussen/gdrive

For the sake of example let's stick to gdrive.

I'd love to delete those files afterwards once the upload is finished as well.

The .rtorrent.rc config entry I tried the last time was:

Code:
system.method.set_key = event.download.finished,uploadtodrive, "execute =/usr/local/bin/gdrive,upload,$d.get_base_path="
The normal notation in the terminal would be:

Code:
gdrive upload [file]
or:
Code:
gdrive upload --recursive [folder]
Can anyone please help me or give me a hint? Thank you.
 

jith45

Member
May 25, 2018
960
0
16
"I want all torrents to be uploaded" ̣- the data, or the metafile?

Besides, doing this from the outside as a cron job is way easier, and avoids rT scripting hell.
 

saroos1

Member
May 25, 2018
718
0
16
The data. Yes, I know. But I would like it to be event based if possible. I'd appreciate anyone helping me out since this seems to be possible in general.

Thanks a lot smiley.gif
 

Attachments

peshua19

Member
May 25, 2018
897
0
16
Thank you. Let's say I could live with that. Could you please tell me how to write the line in rtorrent.rc the proper way?