If snatched via a NewzNab+ indexer, the script can use Direct NZB headers to display the ProperName and EpisodeName in the notification. This is now a new option called "dHeaders". If dHeaders is set to "No" or the indexer does not support DNZB Headers, the full NZB name will be used in the notification.
Library Refresh Mode has now been implemented
Users no longer have to enter in section numbers or copy the script to refresh their TV shows and Movies separately. Library Refresh Mode is a new option that allows the user to choose how they want to script to refresh their library. 'Auto' mode will automatically refresh TV Shows and Movies sections. The script will detect the NZBGet category and also auto-detect the Plex sections by polling the Plex Server's API to figure out what sections are for TV Shows and what sections are for Movies. The plexSections setting has been changed to customPlexSections, if the user would like to scan a section other than TV Shows or Movies. The Custom sections will only be scanned if the Library Refresh Mode is set to Custom or Both.
New settings are movieCat and tvCat. You will have to specify which NZBGet category(s) that you created are intended for movies, and which ones are intended for TV Shows
Sending a GUI Notification to Plex Home Theater client is supported by specifying the IP(s) where PHT is installed. Sending GUI Notifications to multiple clients is now supported.
The script has also been updated to support Plex Home. It will now authenticate with Plex.tv first using HTTP Basic Auth, which is now required for all API commands/methods if Plex Home is enabled. Note that you will need to add your username and password to the NotifyPlex settings (required).
Any feedback or feature requests are welcome.
Requirements: NZBGet v13+ and Python 3.x with requests module
Installation Instructions
- Download NotifyPlex.zip (or git clone) and extract entire NotifyPlex folder into your NZBGet Scripts Directory
- If using VideoSort or other Sort/Rename Scripts, run NotifyPlex after those scripts have sorted/renamed your files.
- Configure Options in WebUI, Save Changes, Reload NZBGet
- Any duplicate scripts (from previous versions) can be deleted. Only one NotifyPlex.py is needed for Movie/TV show/Custom section(s)
- If requests module is missing, do "pip install requests" from your command line to install
- If linux permissions issues arise, do "chmod +x NotifyPlex.py from your command line
Revision 1: Formatting Changes
Revision 2: Added ability to refresh multiple Plex sections at once. Separate multiple sections with a comma (etc. plexSection=1,2)
Revision 3: Added GUI Notification for Plex Home Theater upon successful download. URL requests are now handled by "requests" library which is included in the zip.
Revision 4: Added Authentication with Plex.tv to allow for library refreshing. This was introduced with Plex Media Server version 0.9.11.4 which includes the Plex Home feature. Also added Silent Failure mode, in case you want NZBGet to report SUCCESS if contacting/authenticating with the Plex server fails. There will still be a warning message in the logs.
Revision 5: Added Auto Mode, which will automatically detect the NZBGet category and Plex sections. Added option to Disable Refresh (for users who only want GUI notification). Added ability to send GUI notifications to multiple clients. Changed plexSections to customPlexSections for Custom mode.
Revision 6: Fixed DNZB Header for Movie Year. GUI notification now displays year of movie, i.e. "The Guest (2014)"
Revision 7: Fixed XML Parsing for Plex Sections. Script now properly detects Movie and TV sections by "type" instead of "title"
Revision 8: Did a code overhaul and changed from urllib2 to requests module. Reworked XML parsing to be faster and more efficient and also made some minor code formatting changes. Configuration options/variables have not changed. Simply replace old NotifyPlex.py with new .py and that is all.
Revision 9: The script is now python3 compatible. I also added the ability for the script to save (via pickle) the authorization token to disk inside the NotifyPlex folder. plex.tv sign-in should only be required once. Subsequent library updates will re-use the authorization tokens. There are a few minor cosmetic changes.
Github: https://github.com/mannibis/NotifyPlex