[PP-Script] NotifyPlex - Library Update and GUI Notification

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.
robertpolson
Posts: 13
Joined: 19 Nov 2013, 20:14

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by robertpolson » 03 Jun 2015, 01:26

Making scripts even on your vacation. Hopefully you had some actual time off :)

I got the new script and will test it. However, I am not sure if refreshing all movie sections is better than specifying Plex sections to refresh in Custom mode. If I have multiple movie sections, I don't want to refresh all of them when only one is associated with new releases. I think that it may be better to specify the exact sections(s) to refresh: "New Movies" and "TV Shows" for me. Better to refresh two sections than five movie sections.

What do you think?

mannibis
Posts: 57
Joined: 29 Jul 2014, 15:10

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by mannibis » 04 Jun 2015, 22:12

I agree that refreshing all movie sections is probably not as efficient as choosing custom sections, but it's the only way I can think of to 'automatically' refresh movies based on the NZBGet category without user having to figure out the section numbers. Perhaps I can add a new option to specify the name of the movie sections that should be refreshed and add a new mode, like you said. This way, you can specify "New Movies" and only that section will be refreshed. In the meantime, if you want to keep it automatic and separate TV and and Movie scans, you can keep 'title' in the code and just change the value to "New Movies" instead of "Movies". That way, it will only refresh the "New Movies" section.

konubywy
Posts: 16
Joined: 05 Nov 2015, 15:07

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by konubywy » 31 Aug 2016, 16:36

I'm getting "notifyplex: NOTIFYPLEX: Skipping Plex Update because download failed" even though the download was successful. I have my custom sections properly input into the script. I've tried researching this error message but couldn't find anyone with a similar problem that had a solution. Is this an error on my end or is this script no longer working with the latest plex pass and nzbget versions?

mannibis
Posts: 57
Joined: 29 Jul 2014, 15:10

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by mannibis » 31 Aug 2016, 23:13

Hey, what exact version of NZBGet are you running? I'm on the latest and don't have this issue. It's not related to PMS at all though.

The only time you'll get that error message is if the download wasn't Success/All which means the file has to download successfully and other PP-scripts have to be successful too. Did anything fail in the chain of processing with NZBGet?

Also, if you can check the code below and see if this matches your version of NotifyPlex? Maybe the latest version on dropbox is different https://www.dropbox.com/s/izbkgbin1lttw ... x.zip?dl=0

Code: Select all

ppStatus=os.environ['NZBPP_STATUS']=='SUCCESS/ALL'

konubywy
Posts: 16
Joined: 05 Nov 2015, 15:07

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by konubywy » 31 Aug 2016, 23:49

I'm currently running nzbget 17.1-testing-r1756 and plex version 1.1.3.2700 (the latest of each). The file(s) were downloaded successfully (I tried with both a tv and music category file). My other pp-scripts run just fine. A quick copy/paste from the status of the tv category file for instance is "FakeDetector: SUCCESS FailureLink: SUCCESS flatten: SUCCESS DeleteSamples: SUCCESS ResetDateTime: SUCCESS Notify: SUCCESS notifyplex: none". The relevant section of the log file is:

info Wed Aug 31 2016 18:33:11 Collection TVSHOW.720p.WEBRip.AAC2.0.x264 added to history
info Wed Aug 31 2016 18:33:11 Post-process-script notifyplex.py for TVSHOW.720p.WEBRip.AAC2.0.x264 skipped
error Wed Aug 31 2016 18:33:11 notifyplex: NOTIFYPLEX: Skipping Plex Update because download failed.
info Wed Aug 31 2016 18:33:11 Executing post-process-script notifyplex.py for TVSHOW.720p.WEBRip.AAC2.0.x264
info Wed Aug 31 2016 18:33:11 Post-process-script nzb-notify/Notify.py for TVSHOW.720p.WEBRip.AAC2.0.x264 successful
info Wed Aug 31 2016 18:33:11 Notify: NZBParse - NZB-File parsed 2 meta entries
info Wed Aug 31 2016 18:33:11 Notify: NZB-File detected: TVSHOW.720p.WEBRip.AAC2.0.x264.nzb.queued
info Wed Aug 31 2016 18:33:11 Executing post-process-script nzb-notify/Notify.py for TVSHOW.720p.WEBRip.AAC2.0.x264
info Wed Aug 31 2016 18:33:11 Post-process-script GetScripts/ResetDateTime.py for TVSHOW.720p.WEBRip.AAC2.0.x264 successful

ppStatus=os.environ['NZBPP_STATUS']=='SUCCESS/ALL' is present in the script. I didn't grab the file from dropbox. I just copy/pasted it from the first post of this thread and updated my options for it in the web-gui of nzbget. Is the version in the first post different than the dropbox version?

mannibis
Posts: 57
Joined: 29 Jul 2014, 15:10

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by mannibis » 01 Sep 2016, 00:00

Is this your first time running it? Try changing SUCCESS/ALL to SUCCESS/UNPACK and then saving the py. Maybe something funky is going on and NZBGet doesnt consider the download 100% even though it says so? Weird.

I'm on the latest testing of NZBGet and just re-tested and it's fine.

konubywy
Posts: 16
Joined: 05 Nov 2015, 15:07

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by konubywy » 01 Sep 2016, 00:51

Okay, I've made some progress but now have another issue. My environment path for python is /usr/bin and not /usr/bin/env as stated in the script. I updated that and it attempts to run but I now have a permission denied error. The relevant log section is:

info Wed Aug 31 2016 19:38:54 Collection TVSHOW.720p.WEBRip.AAC2.0.x264 added to history
error Wed Aug 31 2016 19:38:54 Post-process-script notifyplex.py for TVSHOW.720p.WEBRip.AAC2.0.x264 failed (terminated with unknown status)
error Wed Aug 31 2016 19:38:54 notifyplex: Could not start /opt/nzbget/scripts/notifyplex.py: Permission denied
warning Wed Aug 31 2016 19:38:54 notifyplex: Fixing permissions for/opt/nzbget/scripts/notifyplex.py
info Wed Aug 31 2016 19:38:54 Executing post-process-script notifyplex.py for TVSHOW.720p.WEBRip.AAC2.0.x264

I know permissions are correct though. The user/group/permissions are the exact same as all the other scripts which run just fine. The permissions are 755. To test the permission error I even temporarily changed them to 777 and I am still getting the same Permission denied error. Any ideas why it would be giving me a permission denied error even though I've temporarily changed the script to have 777?

mannibis
Posts: 57
Joined: 29 Jul 2014, 15:10

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by mannibis » 01 Sep 2016, 20:48

DId you "chmod +x" it?

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

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by hugbug » 01 Sep 2016, 21:33

/usb/bin/env was correct and the message "notifyplex: NOTIFYPLEX: Skipping Plex Update because download failed." means the script was running.

konubywy
Posts: 16
Joined: 05 Nov 2015, 15:07

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by konubywy » 02 Sep 2016, 02:07

yes @hugbug you are correct. I figured that out last night. The permission error had to do with changing the /usr/bin/env to /usr/bin. The thing is that I get the "notifyplex: NOTIFYPLEX: Skipping Plex Update because download failed." error message even though the download was, in fact, successful. I wish I could further debug why it gives that error message but don't know how I can as I didn't compile my version of nzbget with the debug-mode option. It may or may not be relevant but I've only seen it give that error message with my 'tv' category. The script does seem to run and successfully execute with my 'movie' and 'music' categories though. Weird...

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests