Allow regex replacement in the download location

Issue #4 new
eevee created an issue

I'd like torrents sorted by season, and the obvious approach to me is to write the inclusion regex as:

Title (\d+)x\d+

and the download location as:

/media/Title/Season \1/

Tragically, this doesn't actually work, and all the episodes go into a directory with a literal \1 in it. Would be nice if it did. :)

Comments (2)

  1. eyal0

    I think that I solved your problem. Please consider trying my version:

    First, disable YaRSS2, quit deluuge, and shutdown the server.

    Next, remove the old plugin. For me, it's in C:\Users\eyal0\AppData\Roaming\deluge\plugins

    Next, restart deluge and install this plugin (this is the py2.7 version, only if you use py2.7 and not py2.6):

    https://bitbucket.org/eyal0/deluge-yarss-plugin/downloads/YaRSS2-1.3.3-py2.7.egg

    To test:

    For your RSS feed, in the filter include regex, type this: (.*)\s+(\d+)x(\d+)

    You should see that the matching groups (the parts in parenthesis) are alternating blue and yellow. So, group 1 is blue, then group 2 is yellow, group 3 is blue, etc.

    In the options, for "Download location" and "Move completed", try something like:

    C:\movie_folder\$1\S$2\E$3

    $1 is the first group, $2 is second, etc, up to $9. For a literal $, use $$.

    To make sure that it works, delete a torrent and then reset subscription and run subscription. The new directory should be there.

    Best of luck. Let me know how it goes!

  2. Kai Nilsen

    Hello. So I tried this, but it will create a directory literally named "Showname S$1" I do have a group match, confirmed it on regex101.com.

  3. Log in to comment