Skip to content
bengalih edited this page Aug 31, 2017 · 12 revisions

Deluge

If you are using Deluge, perform the following steps to configure postprocessing for "TorrentToMedia":

  1. Rename the autoProcessMedia.cfg.sample to autoProcessMedia.cfg and edit the parameters:
  • [Torrent] uselink =
    • hard to allow hard-linking of files (quicker and less harddisk used, if download and final location are on the same hard-disk)
    • sym to create a sym-link of files
    • move to move files
    • no to just create a copy. Any movement across hard disks / network MUST use no
  • [Torrent] categories: all categories/labels/sub-directories used by your downloader. music,music_videos,pictures,software
  • [Torrent] outputDirectory: you must set the absolute path to extract videos to. This destination should be different to your download complete folder. It is a temporary location for the copied/linked files. If files are downloaded to /media/download/complete/ Then set the outputDirectory to /media/download/process/ or something similar.
  • [Torrent] DelugeHost = The address for Deluge access localhost
  • [Torrent] DelugePort = The port for Deluge access 58846
  • [Torrent] DelugeUSR = your username for Deluge access (set in the auth file as per step 2 below).
  • [Torrent] DelugePWD = your password for Deluge access (set in the auth file as per step 2 below).
  • [Extensions] compressedExtentions: all extensions you want to be identified and extracted .zip,.rar,.7z,.gz,.bz,.tar,.arj
  • [Extensions] mediaExtentions: all extensions you want to be identified as videos and processed. .mkv,.avi,.divx,.xvid,.mov,.wmv,.mp4,.mpg,.mpeg,.vob,.iso
  • [Extensions] metaExtentions: all other extensions you want to be processed. other extensions will be ignored. .nfo,.sub,.srt,.jpg,.gif
  • [CouchPotato] | [SickBeard] | [NzdDrone] | [HeadPhones] | [Gamez] | [Mylar]: Configure the remaining settings as describes in the wiki pages for each media tool.
  1. In Deluge, enable the Execute plugin from the Plugins menu in Preferences.
  • From the webUI; reopen the Preferences menu for the Execute plugin to be available. Note: After enabling this plugin Deluge may require a restart for it to work properly.
  • The next step is to create a Deluge user for clients/UIs to access the daemon remotely by editing the authentication file auth located in your config directory. The auth file should contain lines with only <username>:<password>:<level> replacing <username> and <password> with your choice and with the desired authentication level (10). You can use your favourite text editor to achieve this or can be done with a one-line echo command e.g.: echo "alice:MyC0mpL3xPass:10" >> ~/.config/deluge/auth
  • The events Torrent Complete should be selected and the full path to the script entered. /usr/local/deluge/nzbToMedia/TorrentToMedia.py
  1. Output from TorrentToMedia will be logged where the scripts reside, in a file called logs/nzbToMedia.log

Windows Notes

Deluge on Windows cannot execute python scripts directly. Therefore you cannot directly call "x:\path\to\nzbToMedia\TorrentToMedia.py" directly. Instead you must create a .bat(ch) file which in turn calls the python script.

The contents of the .bat file should be simply:

x:\path\to\nzbToMedia\TorrentToMedia.py %1 %2 %3

Then configure the Execute plugin to run this batch script. The Execute plugin will pass the 3 internal variables (ID hash, file name of torrent, folder of torrent) to the batch script which in turn calls the TorrentToMedia.py with the three variables.

Clone this wiki locally