wiki:Plugins/deluge
Last modified 3 weeks ago Last modified on 04/23/12 22:12:03

Deluge

Downloads content from entry url and loads it into the deluge bittorrent client.

Requirements: Supports Deluge 1.1, 1.2, and 1.3. This will not work if you are running deluge in classic mode, you must switch to running the daemon seperately. If you are running deluged as a different user, on a different box, or with a non-default config directory, (something other than ~/.config/deluge) you will need to specify the user and pass options that you have set up in your deluge auth file.

If you are installing to a virtualenv, you have to create the virtualenv with the --system-site-packages option. This also applies to an SVN install when running bootstrap.py.

Example:

deluge:
  path: /media/diska/downloads/
  movedone: /media/diska/tv/
  label: tv
  queuetotop: yes

Options

All options are optional and will default to whatever you have set in deluge. If you wish not to set any of the parameters the format is:

deluge: yes

Options

NameDescription
hostDeluge host (default localhost)
portDeluge port (default 58846)
userDeluged username (defaults to automatic client authentication if not specified)
passDeluged password (defaults to automatic client authentication if not specified)
pathThe download location
movedoneThe location files will be moved when torrent finishes (the location will be created if it doesn't exist).
labelDeluge label
queuetotopIf yes will move torrent to top of queue when added, if no will move to bottom.
addpausedIf yes, will add the torrents to deluge in the paused state.
maxupspeedSets the maximum upload speed. Must be specefied as a decimal (i.e. 1.0)
maxdownspeedSets the maximum download speed.
maxconnectionsSets the maximum connections.
maxupslotsSets the maximum upload slots.
ratioSets the ratio to stop seeding at.
removeatratioIf yes, torrent will be removed from deluge when ratio is reached.
compactIf yes, will allocate torrent in compact mode.
automanagedIf set to false torrents will be added to deluge without the automanaged flag.
content_filenameThis can be used to rename the main file inside the torrent. see here
main_file_onlyIf yes, all files but the main file inside the torrent (>90% of total) will be set to 'do not download'

Advanced

Some plugins allow set: statements as a subcommand. The deluge plugin will read any of the normal parameters from the set: command, except for deluge daemon info (host, port, user, pass.) Here is an example using the series module:

Example with set:

series:
  settings:
    720p:
      quality: 720p
      set:
        path: /media/diska/incomplete/
        movedone: "/media/diska/TV/{{series_name}}/"
        label: 720p
    hdtv:
      quality: hdtv
      set:
        path: /media/diskb/incomplete/
        movedone: "/media/diskb/TV/{{series_name}}/Season {{series_season}}/"
        label: tv
  720p:
    - name 1
    - name 2
  hdtv:
    - name 3
    - name 4:
        set:
          movedone: /media/diskb/otherfolder/
          queuetotop: yes
deluge: yes

The more specific set commands will override the less specific ones (i.e. the set command from name 4 will override the set values from the hdtv group.)

Content Renaming*

The deluge plugin also supports another advanced feature: content file renaming. This will allow you to change the filename of the main file inside the torrent in deluge. It will only rename a file if it finds that 1 file in the torrent is larger than 90% of the total torrent content. Here is an example configuration:

series:
  settings:
    groupa:
      set:
        content_filename: "{{series_name}} - {{series_id}} - {{quality}}"
        movedone: /home/user/TV/{{series_name}}/Season {{series_season}}/
  groupa:
    - Show Name
deluge: yes

This config uses jinja2 notation to rename the file using information from the series parser. If there was a file called Show.Name.9x15.REPACK.720p.HDTV.x264-IMMERSE.[eztv].mkv inside the torrent, it would be renamed to Show Name - S09E15 - 720p.mkv If there is already a file with the new name present in either the downloading folder, or movedone folder, a trailing number will be added to the filename. i.e. Show Name - S09E15 - 720p(2).mkv

Together with the movedone command, this means all TV series will be downloaded to:

/home/user/TV/Show Name/Season #/Show Name - S##E## - quality.ext

* This feature requires Deluge 1.2 or newer and FlexGet r1227 or newer.

Windows Users

As of r2297 FlexGet should be able to detect Deluge in its install directory if:

  • Deluge is installed in <program files>\Deluge
  • FlexGet is installed with the same Python version Deluge is using (currently 32-bit 2.6, as of Delgue 1.3.5)

The old instructions are no longer necessary.