[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: 208
Joined: 27 Jun 2014, 22:13
Contact:

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

Post by l2g » 01 Jul 2018, 19:36

@Strayan,

i made my first stab at Windows Notificataion support and I have just pushed my changes to the master branch for testing. Since i don't own a Windows PC i can't really test this very well. I'm hoping for some feedback on your side.

Just download the master branch here and put it in your /scripts directory; reload NZBGet and you just need to create the url windows:// and you're good to go (there are no options).

This relies heavy on windows libraries being available. I think pypiwin32 ships/installs with the downloaded version of Python of their website. But to be safe, you may have to do the following to get it all to connect together:

Code: Select all

pip install pypiwin32
Now keep in mind; this only works if it's executed on the PC you want the notifications to appear on. I also don't know how this will behave when ran as a background service/daemon (attached to NZBGet). It'll be interesting to see what happens none the less.

I look forward to your feedback (or anyone else who's reading this for that matter!). :)

douche
Posts: 47
Joined: 08 Feb 2014, 23:50

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

Post by douche » 12 Jul 2018, 19:17

l2g wrote:
31 May 2018, 00:56
Release v0.9.1 (Direct Download Link) is now in place.

The release details (and new documentation) can be found at the head of this thread (quick link) and/or GitHub.

For information on how to construct a URL you can find details here.

@douche: This includes support of the to= directive to get your email working as you had originally preferred (and i originally intended).

Happy notifying! :)
Hey thanks,

I finally got back and remembered to check on this.
installed the new script, but am getting the following error:

Code: Select all

Notify: could not initialize mailtos://user1:pass@gmail.com?from=user1+alias@gmail.com?to=user2+alias@gmail.com instance.
The old code I used does not work now either, which is:

Code: Select all

mailtos://user1:pass@gmail.com?from=user1+alias@gmail.com
same error.

not sure what if anything I'm doing wrong.

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

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

Post by l2g » 15 Jul 2018, 01:25

douche wrote:
12 Jul 2018, 19:17
=
I finally got back and remembered to check on this.
installed the new script, but am getting the following error:

Code: Select all

Notify: could not initialize mailtos://user1:pass@gmail.com?from=user1+alias@gmail.com?to=user2+alias@gmail.com instance.
The old code I used does not work now either, which is:

Code: Select all

mailtos://user1:pass@gmail.com?from=user1+alias@gmail.com
same error.

not sure what if anything I'm doing wrong.
Try:

Code: Select all

mailtos://user1:pass@gmail.com?from=user1%2Balias@gmail.com&to=user2%2Balias@gmail.com
Basically swap the + for %2B.

The second issue you're having (with your longer url) is the question mark (?) acts as a token identifying the start the URL parameters. Then you need to use ampersand (&) in-between each argument you specify (not another question mark).

With respect to your example though, I don't think Google/Gmail will allow you to change your source email address (the from= part). The following might be better for you:

Code: Select all

mailtos://user1:pass@gmail.com?to=user2%2Balias@gmail.com

douche
Posts: 47
Joined: 08 Feb 2014, 23:50

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

Post by douche » 15 Jul 2018, 04:09

l2g wrote:
15 Jul 2018, 01:25
douche wrote:
12 Jul 2018, 19:17
=
I finally got back and remembered to check on this.
installed the new script, but am getting the following error:

Code: Select all

Notify: could not initialize mailtos://user1:pass@gmail.com?from=user1+alias@gmail.com?to=user2+alias@gmail.com instance.
The old code I used does not work now either, which is:

Code: Select all

mailtos://user1:pass@gmail.com?from=user1+alias@gmail.com
same error.

not sure what if anything I'm doing wrong.
Try:

Code: Select all

mailtos://user1:pass@gmail.com?from=user1%2Balias@gmail.com&to=user2%2Balias@gmail.com
Basically swap the + for %2B.

The second issue you're having (with your longer url) is the question mark (?) acts as a token identifying the start the URL parameters. Then you need to use ampersand (&) in-between each argument you specify (not another question mark).

With respect to your example though, I don't think Google/Gmail will allow you to change your source email address (the from= part). The following might be better for you:

Code: Select all

mailtos://user1:pass@gmail.com?to=user2%2Balias@gmail.com
got it, thanks

M203
Posts: 2
Joined: 31 Jul 2018, 22:11

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

Post by M203 » 31 Jul 2018, 22:34

Great script, just started using it with pushover. Now, how can i make it use the api setting for sending silent (ie no notification).

priority - send as -2 to generate no notification/alert.

BR
M203

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

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

Post by l2g » 02 Aug 2018, 02:55

@M203
You should be able to do that with just manipulating the URL a bit.
Try:
pover://{user_id}@{token}/?priority=-2

You can also do:
pover://{user_id}@{token}/?priority=low

Let me know if that works or not.

M203
Posts: 2
Joined: 31 Jul 2018, 22:11

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

Post by M203 » 03 Aug 2018, 15:38

Thanks!

-2 didnt work. Low did work!

Thanks again!

douche
Posts: 47
Joined: 08 Feb 2014, 23:50

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

Post by douche » 07 Aug 2018, 00:53

Just an observation, it seems that the first character of filenames that are included in the "Success" emails under "File(s)" is omitted?

Not a big deal at all, but just thought I'd mention it, as a quick search didn't return any results of the same issue.

In other words, if some of the file names are:
My.release.mkv
Other.release.mkv
Last.release.mkv

The email only shows them as:
y.release.mkv
ther.release.mkv
ast.release.mkv

I rarely even look at that portion of the email, but I just noticed that the filenames have a character missing.

Cheers.

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

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

Post by l2g » 07 Aug 2018, 19:05

@douche,
Unfortunately I don't get the same result that you're getting.

What notification type are you using (email, push bullet, etc)? I'll investigate this more once i can reproduce it.

Chris

douche
Posts: 47
Joined: 08 Feb 2014, 23:50

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

Post by douche » 08 Aug 2018, 00:09

l2g wrote:
07 Aug 2018, 19:05
@douche,
Unfortunately I don't get the same result that you're getting.

What notification type are you using (email, push bullet, etc)? I'll investigate this more once i can reproduce it.

Chris
Using gmail via:

Code: Select all

mailtos://
Upon completion of a download, files are post-processed with the videosort script from hugbug to a root directory of a drive.

Example of the complete email:

Code: Select all

Other.release

Status: SUCCESS/ALL
Statistics

    Download Size: 50892.00 MB
    Download Time: 00:40:38
    Transfer Speed: 20.87 MB/s
    Analyse Time: 00:00:00
    Repair Time: 00:00:00
    Total Archive Preparation Time: 00:00:00
    Unarchiving Time: 00:07:02
    Total Post-Process Time: 00:07:32
    Total Time: 00:48:10

File(s)

    RECYCLE.BIN\S-1-5-21-#########-##########-##########-1000\desktop.ini (129.00 B)
    RECYCLE.BIN\S-1-5-21-#########-##########-##########-1001\desktop.ini (129.00 B)
    RECYCLE.BIN\S-1-5-21-#########-##########-##########-500\desktop.ini (129.00 B)
    y.release.mkv (48.17 GB)
    ther.release.mkv (53.74 GB)
    ast.release.mkv (36.45 GB)
It might be important to note that the NZB Title is correct (no cut-off first letter) - "Other.release" in my example above.
Only down below under "File(s)" is the first letter cut-off from the filenames

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests