[PP-Script / Queue-Script] Notifications (All In One)

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
l2g
Posts: 228
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by l2g » 14 Mar 2015, 13:17

@hugbug:
Thanks for all that information. I'm a bit confused then how the Extension Script options work. When i was first developing the Notify.py script, I can't remember having it work until i added it to the QueueScript section (see attached image). Where it explicitly says: List of queue scripts to execute after a nzb-file is added to queue.
I always thought through this section, it gave us (the users) the ability to control what was being called and how it was being called. Reguardless, thank you for all the info and sorry jedib0p for providing you false information.

jedib0p:
I've created an updated release here (also on first post) that accomodates your request. I've also added HugBug's queue event signature advice to this release as well.

Let me know if you have any problems.
Attachments
NZBGet-QueueScript.png
To illustrate my QueueScript question

jedib0p
Posts: 6
Joined: 13 Mar 2015, 22:04

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by jedib0p » 14 Mar 2015, 13:43

I've got it on the PostScript section and I just get the one notification at successful completion now - Thanks!

However, I still get a warning and error while using your script. 'Notify: Process directory missing' warning on adding to queue and the error: 'Notify: NZBParse - NZB-File is corrupt' on completion.

Any idea how to fix that? I'm using VideoSort without categories defined. My categories are defined in the global menu and my download disc is an external drive if that helps at all.

Thanks for the quick turn around.

l2g
Posts: 228
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by l2g » 14 Mar 2015, 14:07

jedib0p wrote:I still get a warning and error while using your script. 'Notify: Process directory missing' warning on adding to queue and the error: 'Notify: NZBParse - NZB-File is corrupt' on completion.
Any idea how to fix that?
If you wouldn't mind jedib0p, could you enable debug mode on the Notify script and paste me back some more of the log details surrounding that? Also, i can tell you off hand that you don't need to worry about either of these warnings, but i do realize they could be annoying to see all the time. I will definitely look further into this for you. A few more questions: What OS are you using? What version of Python are you using?

The second error (NZB-File is corrupted) is a result of libraries missing on your machine; but the aren't essential at all for this script; they just improve it's fuctionality if they're present. But the debugging will shed more light on this anyway! :)

hugbug
Developer & Admin
Posts: 7542
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by hugbug » 14 Mar 2015, 16:16

l2g wrote:@hugbug:
Thanks for all that information. I'm a bit confused then how the Extension Script options work. When i was first developing the Notify.py script, I can't remember having it work until i added it to the QueueScript section (see attached image). Where it explicitly says: List of queue scripts to execute after a nzb-file is added to queue.
I always thought through this section, it gave us (the users) the ability to control what was being called and how it was being called.
That was extended in order to being able to choose queue-scripts on per-nzb basis. If a (post-processing) script is selected for nzb, it is also executed during download on queue events, if it is a queue-script at the same time. Pp-scripts can be selected via global PostScript, CategoryX.PostScript or manually in the download details dialog. Because the script is selected for nzb it is also logical to execute it on queue events. Pure queue-scripts are controlled only via option QueueScript.

I understand that can be somewhat confusing but I don't have a better idea. I didn't thought about that someone may not want to executed the pp/queue-script on queue events but only as pp-script. That's indeed a flaw of the concept. But considering the solution is actually simple (add an option to the script) I think we can live with it.

The short description on option QueueScript is a little outdated, I'll updated it.

hugbug
Developer & Admin
Posts: 7542
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by hugbug » 14 Mar 2015, 16:39

I was thinking about removing option QuickScript and let PostScript manage the queue-scripts too. That would be less confusing but would require a reconfiguration for users having queue-scripts. That's why I decided to keep option QueueScript. May be I should reconsider.

jedib0p
Posts: 6
Joined: 13 Mar 2015, 22:04

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by jedib0p » 15 Mar 2015, 00:50

I'm using Mac OS X Yosemite (10.10.2). I'm using the system version of Python /usr/bin/python which is version 2.7.6 (unless NZBGet.app uses a different version -- not sure)

Here's the two relevant sections from my log with debugging on.
Sat Mar 14 20:39:46 2015 INFO Executing queue-script nzbget-notify-0.1.9/Notify.py for Matador.2014.S01E11.Riot.til.I.Die.1080p.WEB-DL.DD5.1.H.264-Oosh
Sat Mar 14 20:39:47 2015 WARNING Notify: Process directory is missing: /Volumes/Scorcese/Usenet Temp/Matador.2014.S01E11.Riot.til.I.Die.1080p.WEB-DL.DD5.1.H.264-Oosh.#1612
Sat Mar 14 20:39:47 2015 INFO Notify: [DEBUG] get(config) ONQUEUE="no"
Sat Mar 14 20:41:07 2015 INFO Executing post-process-script nzbget-notify-0.1.9/Notify.py for Matador.2014.S01E11.Riot.til.I.Die.1080p.WEB-DL.DD5.1.H.264-Oosh
Sat Mar 14 20:41:08 2015 INFO Notify: [DEBUG] get_files('/Users/XXX/Library/Application Support/NZBGet/tmp') with 1 filter(s)
Sat Mar 14 20:41:08 2015 INFO Notify: [DEBUG] get(system) NZBDIR="/Users/XXX/Library/Application Support/NZBGet/nzb"
Sat Mar 14 20:41:08 2015 INFO Notify: [DEBUG] get_files('/Users/XXX/Library/Application Support/NZBGet/nzb') with 1 filter(s)
Sat Mar 14 20:41:08 2015 INFO Notify: [DEBUG] Allowed Matador.2014.S01E11.Riot.til.I.Die.1080p.WEB-DL.DD5.1.H.264-Oosh.nzb.queued (regex)
Sat Mar 14 20:41:08 2015 INFO Notify: [DEBUG] NZB-Files located: Matador.2014.S01E11.Riot.til.I.Die.1080p.WEB-DL.DD5.1.H.264-Oosh.nzb.queued (2015-03-14 20:39:46)
Sat Mar 14 20:41:08 2015 INFO Notify: NZB-File detected: Matador.2014.S01E11.Riot.til.I.Die.1080p.WEB-DL.DD5.1.H.264-Oosh.nzb.queued
Sat Mar 14 20:41:08 2015 ERROR Notify: NZBParse - NZB-File is corrupt: /Users/XXX/Library/Application Support/NZBGet/nzb/Matador.2014.S01E11.Riot.til.I.Die.1080p.WEB-DL.DD5.1.H.264-Oosh.nzb.queued
Sat Mar 14 20:41:08 2015 INFO Notify: [DEBUG] NZBParse - xml.etree.cElementTree Exception __init__() got an unexpected keyword argument 'tag'
Sat Mar 14 20:41:08 2015 INFO Notify: [DEBUG] get(system) NZBID="1611"

l2g
Posts: 228
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by l2g » 17 Mar 2015, 23:43

I hadn't forgotten about you, try downloading the master branch right now to test out a few new changes i pushed here.

Please share your results (good or bad). If they're bad, i'll keep slugging at it; if it's good, i'll bundle it as a new release.

jedib0p
Posts: 6
Joined: 13 Mar 2015, 22:04

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by jedib0p » 18 Mar 2015, 01:06

The warning I received on adding to the queue is fixed.

I still get an error at the completion of post processing though. I can post the log if you require it.

pacload
Posts: 2
Joined: 21 Mar 2015, 03:52

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by pacload » 21 Mar 2015, 04:37

Hello l2g

Thank you for this get script! I was able to get it working for myself but I was wondering is it possible to push pushbullet notifications to multiple users? I tried using the channel option but I seem to be the only one getting it and it's not pushing as my created channel either.


Thank You!

l2g
Posts: 228
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script / Queue-Script] Notifications (All In One)

Post by l2g » 21 Mar 2015, 18:18

pacload wrote:Hello l2g

Thank you for this get script! I was able to get it working for myself but I was wondering is it possible to push pushbullet notifications to multiple users? I tried using the channel option but I seem to be the only one getting it and it's not pushing as my created channel either.


Thank You!
That should work just using the server string:

pbul://YOURKEY/email1@domain.com/email2@domain.com

Also, for the emails to work: they must be in your 'CONTACTS' listing (visible after you log into PushBullet). If they don't show up; then it won't work at all.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests