pyed / transmission-telegram

Control your Transmission through a Telegram bot
Apache License 2.0
288 stars 47 forks source link

Send message when download is complete #18

Closed JNat closed 5 years ago

JNat commented 5 years ago

I think it'd be neat if the bot sent me a message once a torrent completes downloading — granted, it could be considered noise, so maybe it was left out deliberately?

pyed commented 5 years ago

actually I implemented that in pyed/rtelegram, never had the time to port it here, maybe you could do it.

JNat commented 5 years ago

mmm... I'm not familiarized with go, but I'll have a look some time in the coming month and see if I can infer the behaviors from context :)

JNat commented 5 years ago

Is it just a matter of copying what's nested inside the function under if ComLogFile != "" here, so it replaces what's nested inside the function under if TransLogFile != "" here (and making a small code change due to the names being different)?

Again: not familiarized with go. Also currently unable to try and test this locally myself.

JNat commented 5 years ago

Yeah, looks like that's pretty much what's in your dev branch, @pyed :)

pyed commented 5 years ago

Yeah the idea is that I make my torrent client log every completed download to a file, and watch said file for new completed downloads and send a message about them.

JNat commented 5 years ago

Yup, I got it from reading those bits of code :)

So if we merge your dev branch, would that do it? Or does it need anything extra?

pyed commented 5 years ago

I really can’t recall what I was doing, I’m kinda busy these days, I will take a look into it when I have the time.

On 23 May 2019, at 10:46 AM, JNat notifications@github.com wrote:

Yup, I got it from reading those bits of code :)

So if we merge your dev branch, would that do it? Or does it need anything extra?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pyed/transmission-telegram/issues/18?email_source=notifications&email_token=AAOSGD2FDJBOHEJYHBJIIKDPWZDWHA5CNFSM4HIPONXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWBLSRI#issuecomment-495106373, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOSGD67ZXCAHEFKLZ6O42DPWZDWHANCNFSM4HIPONXA.

pyed commented 5 years ago

I had the time to look into it, actually the notification upon completion feature is already here, even though I was using a different tailing package in the dev branch, I thought I never implemented it for transmission 🤷‍♂

all you have to do is run your transmission-daemon with the --logfile option to have a log file, and run transmission-telegram with the -transmission-logfile flag and point that to the transmission log file, upon the completion of any torrent it should send you a message.

JNat commented 5 years ago

Hey, don't you need to trigger a new release for this to propagate to new download, etc.? :)

Or is there some other way for me to get this running with these new changes on a machine that doesn't have golang installed?

moToroTor commented 2 months ago

Needs a new build released, the wiki says this feature is out but it's not in the latest release v1.4.