caronc / nzb-notify

Push Notifications to a large number of supported services for NZBGet and SABnzbd (based on Apprise)
GNU General Public License v3.0
129 stars 16 forks source link

Discord notification only sending via test? #58

Closed Tharic99 closed 4 years ago

Tharic99 commented 4 years ago

I'm hoping that i'm missing something here.

I'm running NZBGet in a docker container and ran into a few issues getting setup (https://github.com/caronc/nzb-notify/issues/57)

However, I can successfully click Test Server Configuration in NZBGET and I get a test message in Discord.

NZBGETBOTToday at 1:22 AM
NZBGet-Notify Configuration Test
## NZBGet-Notify Configuration Test ##
- OnFailure: Yes
- OnSuccess: Yes
- Include Statistics: Yes
- Include File Listings: Yes
- Include Log Details: Yes

However, that's all I get.

I have it set for OnQueue, OnFailure and OnSuccess, but no matter what goes into NZBGET, I never get a notification in discord.

Any ideas what I'm missing here?

Also, Script Version: 0.9.3.

caronc commented 4 years ago

It sounds like your 99% of the way there!

The only thing you need to do now is make sure NZBGet is aware that it should call this script when a download completes. In your NZBGet Settings (left hand side), click on Extension Scripts.

On this screen you must make sure Notify.py is set up here... here is a screenshot: Screenshot from 2019-09-07 09-29-30

caronc commented 4 years ago

As another note, Discord has nice markdown support. As another piece of friendly advice (completely outside of this question you have): in your discord:// URL, just add format=markdown to it. It works nicely with NZB-Notify :slightly_smiling_face:

So your Notification URL will look like: discord://{WebhookID}/{WebhookToken}/?format=markdown

Tharic99 commented 4 years ago

It's working now by making those modifications to NZBGet! Thanks! You should put that in the Wiki for folks like me - haha.

I noticed though when I use the /?format=markdown, the text looks like this:

NZBGet-Notify Configuration Test
NZBGet-Notify Configuration Tes
t ##

or:

Download Successful
<filename here>
d ##
Statistic
s ###
File(s
) ###
caronc commented 4 years ago

Hmm, that doesn't seem right. Are you using the latest version of apprise and NZB-Notify?

I'll investigate this further soon. In the meantime, I guess just don't use the format=markdown option.

Tharic99 commented 4 years ago
Script Version: 0.9.3.

Is Apprise a separate check or if I'm running NZB-Notify 0.9.3 is Apprise auto updated in that?

caronc commented 4 years ago

It's interesting how i was able to solve your question, but by offering friendly advice, I uncovered an annoying bug i didn't even know existed. I'm honestly surprised that no one has complained about this yet :slightly_smiling_face: .

The good.. (or bad?) news is that I was able to reproduce your issue exactly; I created an Apprise ticket here as a result. I have already pushed a small fix that appears to have worked (for me); but I want to do a bit more testing before I officially commit it. Here is what the output looks like (with fix in place): Screenshot from 2019-09-09 21-59-35

I will try to do more testing and merge it up-stream when I'm satisfied. I plan on making an Apprise v0.8.0 release soon (maybe in a week or so) which will make the fix more easily available for/to you. But for now.. If you can just forget I ever mentioned the markdown reference (:wink: ) (hah.. just for now), It'll be good to go in the not-so-far-away-future. :slightly_smiling_face:

Edit: never-mind; unit tests failed after my so-called-fix; my first attempt didn't completely go as planned. Thus I'll definitely need more time to figure this one out. Also: If it's okay with you; I'm going to close this issue (since your question has been answered). I'll resume debugging the markdown problem in the other ticket/issue I've got open now.

caronc commented 4 years ago

Apprise v0.8.0 pushed upstream. You should be good to go now! Just run:

pip install --upgrade apprise

I'm closing this ticket off; but feel free to still write here and/or re-open it if you're having any problems.

Tharic99 commented 4 years ago

Since I'm running NZBGET inside of a docker container, this won't update for me on a "permanent" basis until NZBGET is updated to include this apprise upgrade as well, correct?

caronc commented 4 years ago

Yes, you're right.