-
Notifications
You must be signed in to change notification settings - Fork 276
NZBtoMedia
NZBtoMedia is a collection of scripts for post-processing.
Normally Medusa scans the download folder for new files/downloads every 10 minutes. However that prevents the hard disks from going into sleep/hibernation. Scripts on the other hand let Medusa instantly know if a download was completed. Therefore the scanning of the tv download folder
isn't necessary anymore.
Another advantage is that other post-processing options can be done, before the file is sent to Medusa. But most of those options are already included in Medusa, so you probably wont use them.
Last and probably the MOST important reason, it supports failed downloads. Meaning that when your client fails to download the file a notification gets sent to Medusa and a new search gets started, with hopefully now a valid file.
- Enable inside Medusa :
Settings
-->Search Settings
-->Use Failed Downloads
! - Make sure the permissions and file ownership are correctly set.
- Windows users will need to install the pywin32 extensions to run NZBtoMedia.
With every client that allows to run a script after the download. Most famous is probably SABnzbd, but also Synology's Download Station and Transmission support this. For more info see NZBtoMedia's Repo
The good news is that NZBget has NZBtoMedia support build-in to the program. This allows for easy configuration.
First you need to make sure that NZBget points to the NZBtoMedia files. Sometimes the files are included in the NZBget/Scrips folder. However if they are not you have two options. Manually download the latest NZBtoMedia package and unpack them there. Or point to the NZBtoMedia folder included within Medusa. This can be done in NZBGet by going to Settings --> PATHS --> ScriptDir
.
==
The first step is to do the basic configuration of NZBget. So add your Usenet provider and download path etc.
Go to PATHS
and fill-in your download Path that Medusa monitors under MainDir
or DestDir
depending on your preference.
==
Go to CATEGORIES
in the Settings. Push on Add another categorie
at the bottom of the page to add a new categorie. (or re-use an already existing categorie)
- Under
name
addtv
- Under
Postscript
chosenzbToSickBeard
And save the settings.
==
Next we need to setup the settings for the nzbToSickBeard script itself.
Go to nzbToSickBeard
in the Setting. Now change/add :
-
sbcategory
leave set totv
(or change if you changed it in Medusa.) -
sbhost
leave tolocalhost
(or enter IP if Medusa runs on different machine) -
sbport
Enter the port on witch Medusa is running. -
sbusername
Enter the username if Medusa requires login. -
sbpassword
Enter the password if Medusa requires login. -
sbprocess_method
Use your preferred process method.
(more advanced settings can be set, but make sure you understand there functions.!)
And save the settings.
==
By default NZBget will create a sub-directory with the name of the category. And some users might not like that. To change this go to INCOMING NZBS
under settings and set appendedcategorydir
to NO
And save the settings.
If you are lucky you might already be familiar with the SABtoSickbeard script. The setup is almost identical to that.
But first we need to configure the autoProcessMedia.cfg to include your user-name/passwords/ip/port etc.
( SABtoSickbeard works but is outdated and doesn't support failed downloads.)
==
First locate your contrib
folder where NZBtoMedia is located, or download/install it on a location you prefer. Included in the NZBtoMedia folder is a file called autoProcessMedia.cfg.spec
.
Copy the autoProcessMedia.cfg.spec
file and rename it to autoProcessMedia.cfg
in the same folder.
Now open the autoProcessMedia.cfg
with your favorite editor.
Go to the [SickBeard]
section and add/change the following settings. :
[SickBeard]
-
enabled = 0
(Change the0
to1
to enable Medusa) -
host = localhost
(Change IP number if Medusa runs on a different device) -
port = 8081
(Change the port to the one that your Medusa install uses) -
username =
(Add your username if you have enabled login in Medusa) -
password =
(Add your password if you have enabled login in Medusa) -
fork = medusa / medusa-apiv2
(Only replaceauto
withmedusa
if detection problems) -
force = 0
(Skip detection for already processed downloads) (fork=medusa-apiv2 only) -
is_priority = 0
(Always overwrite existing downloads with a new one, discard quality checks) (fork=medusa-apiv2 only)
Go to the [Nzb]
section and add/change the following settings. :
[Nzb]
-
clientAgent = sabnzbd
(Add sabnzbd) -
sabnzbd_host = localhost
(Change/add the IP number if needed) -
sabnzbd_port = 8081
(Change the port if needed) -
sabnzbd_apikey
= (Add the API key of sabnzbd) -
default_downloadDirectory = "/downloads"
(add your tv download dir)
(Note: There are more advanced settings that you can modify, but they are not needed in most cases.)
Thats it. Now save the file.
As of Medusa version 0.5.9 a new feature download handler has been added. With this change Medusa also support async postprocessing. This means that while using async postprocessing, medusa can continue running other tasks in parrallel.
Support for async postprocessing has been added through the apiv2. To make use of async postprocessing, you will have to set fork to medusa-apiv2
and fill in the api key. For more info on the download handler please visit Medusa's (wiki).
First step is to let SABnzbd know where the NZBtoMedia scripts are located.
Do this by going to. : Config
-> Folders
-> User Folders
-> Post-Processing Scripts Folder
Now browse to the location where they are located and save the new path.
==
The second step is to setup the categories. When Medusa sends an nzb to SABnzbd it adds a tag. the defealt is tv
. The Categories allow to run a script when a certain tag is sent/found by SABnzbd.
In our case we want to do this with the tag tv
that Medusa uses.
Go to : Config
-> Categories
See if there is already a category called tv
and if not create one.
Than select in the Script
column "nzbToSickBeard.py" as the script needs to be executed after the file was downloaded by SABnzbd. (In case there are no scripts the select, than make sure you have sett the correct scripts folder mentioned in the previous step.)
The "Folder/Path" doesn't need to be set, but if you are having problems than set to the location where you want your movies extracted to (Usually just set this as tv to move files to a tv sub-directory in the download completed directory)
==
The next steps are not necessary but recommended.
Go to : Config
-> Switches
-> Post-Process Only Verified Jobs (off)
And deselect, in order to allow for snatching of the next best release. (mainly used with CouchPotatoServer if a download fails.)
==
With the release of SABnzbd version 0.7.5 a new special parameter named "empty_postproc" was introduced. This allows for better handling of failed downloads.
Go to : Config
-> Special
-> empty_postproc (on)
And change the setting to off.
==
A successful run of the script should look like this in SABnzbd. :