nzbToMedia for NZBGet V11+

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.
Post Reply
clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

nzbToMedia for NZBGet V11+

Post by clintonhall » 18 Apr 2013, 05:16

So I just updated 6 of my scripts in dev branch.

https://github.com/clinton-hall/nzbToMe ... 2218f69839

nzbToMedia.py is a single script that will handle all 5 categories, or the 5 nzbTo* scripts can be used individually.
When I create a compiled version for windows I will only provide the one script as compiling all 5 gets too large. Best results will be gained using the .py scripts with python and pywin installed.

All 6 of these scripts will allow the configuration to be set via webui, and then upon running the script writes the config into the autoPorcessMedia.cfg (this was easier than trying to edit all of the other scripts that use these params, and keeps this compatible if using more than 1 downloader... i.e. combination of nzbs and torrents).

I will try and get the "WOL" and "Transcode" scripts separated out later... for now these are just embedded but can be enabled/disabled in the options (again, I am keeping this compatible for all downloaders).

It is intended that these scripts be run AFTER the default cleanup script and before the logger and email scripts if you want those.
Debug logging in my scripts is achieved through an independent log (postprocess.log).

this is a first-pass attempt and will no-doubt need some tweaking.

To use: add the path to nzbToMedia in the settings, Paths, ScriptDir.
Copy the default scripts from NZBGet into the nzbToMedia folder (note, you can rename this folder to "scripts etc as you need)
Look here http://nzbget.sourceforge.net/forum/vie ... ?f=3&t=740for details on how to set the scripts for categories etc, and how to set the script options.
Please provide any feedback on this thread, on my github issue tracker, and if you are feeling really helpful, feel free to edit the wiki on my github repo to document how you set this up for your system ;)

Issues I need to address are:
1. postprocess.log, autoProcessMedia.cfg, README.MD and a few other files that are included in my repo will unfortunately appear in the postprocess scripts list (I may need to move all of these into a sub directory)
2. transcoder, WOL and other functions need to be separated into individual scripts.
Last edited by clintonhall on 18 Apr 2013, 11:05, edited 1 time in total.

sflargo
Posts: 27
Joined: 12 May 2012, 10:13

Re: nzbToMedia for NZBGet V11+

Post by sflargo » 18 Apr 2013, 08:11

maybe I am blind but what exactly does this script?
transcoding a file which has been downloaded?

hugbug
Developer & Admin
Posts: 6720
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 18 Apr 2013, 08:21

It's for users using CouchPotato and SickBeard.
CouchPotato - An automatic NZB and torrent downloader, just fill in what you want to see and CouchPotato will add it to your "want to watch"-list. Every day it will search through multiple NZBs & Torrents sites, looking for the best possible match.
Once a correct release is found, it will send it to your favorite download app.
Sick Beard is a PVR for newsgroup users (with limited torrent support). It watches for new episodes of your favorite shows and when they are posted it downloads them, sorts and renames them, and optionally generates metadata for them. It currently supports NZBs.org, NZBMatrix, NZBs'R'Us, Newzbin, Womble's Index, NZB.su, TVTorrents and EZRSS and retrieves show information from theTVDB.com and TVRage.com.
More info on script - Postprocessing torent&nzbToMedia.
Transcoding is an add-on but not the main purpose which is to communicate with CouchPotato and SickBeard.

hugbug
Developer & Admin
Posts: 6720
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 18 Apr 2013, 09:15

Small tip: for options having predefined values add the list of possible values to the short option description:
# CouchPotato Postprocess Method (renamer, manage).
#
# use "renamer" for CPS renamer (default) or "manage" to call a manage update.
#cpsmethod=renamer
If a list of values is defined the web-interface shows radio buttons instead of edit field. This makes config more robust.

clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

Re: nzbToMedia for NZBGet V11+

Post by clintonhall » 18 Apr 2013, 10:19

of course... I knew you could do this for yes/no and I recently discovered yes/no/auto... this should make it much neater. I presume 0 and 1 are also possible.

I just saw that the optware version is up... working on updating the qnap .qpkg to run v11+ and playing with integrating these scripts.... Hopefully I can start testing something tonight... so I'll try and tidy up these options when I see what they look like.

clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

Re: nzbToMedia for NZBGet V11+

Post by clintonhall » 19 Apr 2013, 02:38

just post-processed a episode sent by SickBeard. The postprocess worked fine (amazingly I manage to add so many features without breaking anything ;) ).

The new interface appears to work brilliantly.

hugbug
Developer & Admin
Posts: 6720
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 19 Apr 2013, 09:43

It's great how fast you adopt your project to new pp-scripts-concept!
For python on windows, the issue I have seen with my scripts and with CouchPotato is the need to also have pywin installed if the script does any path manipulation.
Can you please point me to a source file in nzbToMedia where pywin is used? I've checked every file but couldn't find any "suspicious" imports.

clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

Re: nzbToMedia for NZBGet V11+

Post by clintonhall » 19 Apr 2013, 09:53

lol... you probably know more about my scripts than I do ;)

I just assumed pywin was needed for any os.path manipulation, but it might just be that pywin is required for GUI's that try to access file/path (this is certainly the case for CouchPotatoServer)

all of my "compiled" scripts are compiled on a system with python and pywin installed... I just assumed both were needed. I don't have a windows box available (currently) that doesn't have pywin, so I can't verify functionality without pywin. But if python is the only requirement, this does make it easier.

hugbug
Developer & Admin
Posts: 6720
Joined: 09 Sep 2008, 11:58
Location: Germany (NRW)

Re: nzbToMedia for NZBGet V11+

Post by hugbug » 19 Apr 2013, 10:16

Looks like os.path is pythons built-in module whereas PyWin is a bridge to Windows specifics such as COM, UI, etc. (list of modules).

I can imagine CouchPotato using PyWin for NT Service for example.

clintonhall
Posts: 449
Joined: 15 Dec 2012, 01:52
Location: Australia
Contact:

Re: nzbToMedia for NZBGet V11+

Post by clintonhall » 19 Apr 2013, 10:58

if pywin isn't installed when running the source version of couchpotato all path selections/navigation in the UI are blank. So I (incorrectly) assumed pywin altered the way os.path was handled and I never thought to look any closer.

I'm not actually a programmer. I do a lot of MatLab programming for work, taught myself some C++ a few years ago because I was bored, and then started editing sabToSickBeard to work with CouchPotato... from there my scripts have grown well beyond my actual understanding of what is and isn't required ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests