flexget

Can someone explain to me how to make Flexget not suck, please? I made the mistake of upgrading from 1.0.something to 1.1.165 and everything went to hell.

Simplified, I have:

    tasks:
      tvtorrents:
        rss: ...
        all_series:
          path: ~/Movies/Torrents/%(series_name)s/
        series:
          - The Daily Show

and tonight's Daily Show torrent showed up in "Torrents/" instead of in "Torrents/The Daily Show/". This used to work before.

The torrent's actual name is "The.Daily.Show.2013.12.09.Husain.Haqqani.HDTV.x264-BATV.mp4". The debug log shows the words "series_name: The Daily Show" in several places.

Bonus points if you can tell me how to remove "The" from the beginning of every subdirectory name, because I'm one of those crazy people who believes that you don't alphabetize things that begin with "The" under "T". I have tried all of these and none work:

    # "Could not set path for FILE: (UndefinedError) 'path' is undefined"
    # "FILE: (UndefinedError) 'path' is undefined"
    # Lands in ~/Torrents/, not the subdir
        series:
          - The Daily Show:
              set:
                path: "{{path|replace('/The ','/')}}"

    #
    Remains "UNDECIDED"
        series:
          - The Daily Show:
              set:
                series_name: 'Daily Show'

    #
    Remains "UNDECIDED"
        series:
          - (The) Daily Show:
              set:
                series_name: 'Daily Show'

    #
    Lands in ~/Torrents/, not the subdir
        series:
          - (The) Daily Show

    #
    "The key `set` is not valid here."
        series:
          set:
            path: "{{ path|replace('/The ', '/') }}"

    #
    "[/transmission/path] `` does not exist"
        transmission:
          path: "{{ path|replace('/The ', '/') }}"

    #
    Lands in ~/Torrents/, not the subdir
        all_series:
          set:
            path: "{{ path|replace('/The ', '/') }}"

The only incantation that I know of that comes even close to producing debugging output for this bullshit asstastic piece of shit is "flexget -v --debug --debug-trace --inject filename" -- is there some better way to get it to tell you what the fuck it thinks it's doing?

The fact that these rules appear to fire in a completely random order is... well, is firmly among the worst things about it.


Update: After a week of trial and error, this is the only thing I was able to come up with that works:

tasks:

  tvtorrents:
    rss: https://...

    all_series:
      timeframe: 1 hours
      target: 720p+
      propers: no
      specials: no
      path: "~/Movies/Torrents/{{series_name}}"

    series:

      #
Specify explicit path for any shows beginning with "The".
      #
I can't find any more general way to do this kind of rewrite.
      #
There's no way to do "s/^The //" using {{variables}} or
      #
using "set" or using "manipulate" in either "series",
      #
"all_series" or "transmission".  The one and only way is
      #
to specify the full path name each time here.

      - The Daily Show:
          path: "~/Movies/Torrents/Daily Show"

      - The Colbert Report:
          path: "~/Movies/Torrents/Colbert Report"

      - Marvel's Agents Of S H I E L D:
          path: "~/Movies/Torrents/Agents of SHIELD"

      #
Specify explicit capitalization, and trim some titles to a
      #
leading substring.  This only does prefix matches.  If you
      #
want to omit words from the front, do it as above.

      - Archer
      - Doctor Who

    transmission:
      removewhendone: true

    retry_failed:
      retry_time: 15 minutes
      retry_time_multiplier: 1.5
      max_retries: 20
Tags: , , ,

12 Responses:

  1. Friedrich Delgado says:

    I like your style, dude!

    No, sorry, I can't help you other than rtfw and maybe the developers will take note.

    Maybe post more rants about flexget, I have to admit I'm quite enjoying them. I have similar problems with flexget and its (lack of understandable) documentation.

  2. James Hendrickson says:

    Maybe this is of limited help but at least it solves your random execution issue. http://flexget.com/wiki/Plugins/priority This plugin will at least cause tasks to be executed in the same order each time.

    • jwz says:

      "priority: n" appears to be illegal everywhere I tried to use it. I get either: "The key `priority` is not valid here", or: "expected <block end>, but found '?' in "<unicode string>", line 37, column 7: priority: 3"

  3. Sorry for multiple posts, I thought I could edit my previous post. http://flexget.com/wiki/Cookbook/Series/SeriesPresetMultipleRSStoTransmission Apparently there is a section that starts with "Note: If the Manipulate section is uncommented it will remove the leading "The" from all feed results in the metainfo phase before any of the other plugins start processing creating a preferred way of series since so many of them start with "The". " Is this pertinent to your desire to remove the leading "the"? I have to crash it's 2:48 am here but if no one else hit the jackpot on the directory thing I'll try to help tomorrow.

    • jwz says:

      Well that's interesting, except that the syntax is invalid.

      Sounds promising, though. If only the doc for "manipulate" made any god damned sense at all.

    • jwz says:

      And when I tried placing either of these at the same indentation as series, I just get "Cannot replace, field `path` is not present":

          manipulate:
            - series_name:
                replace:
                  regexp: '^The\W'
                  format: ''

          manipulate:
            - path:
                replace:
                  regexp: '/The\W'
                  format: '/'

  4. Probably the easiest way to control how directory names come out is to use that as the series title, and define an alternate one for matching. i.e.:

    series:
      - good show: # This will be used for all dir names
          alternate_name: the good show # This will be used to match release titles

    • Another method:
      Do the replace when setting the path: /somewhere/{{series_name|replace('The ', '')}}

      The problem with the way you were doing it is that it's recursive. You can't set the 'path' field based on the 'path' field, since the path field doesn't exist yet.