Agents of SHIELD not renaming/moving!

Hi all,
My config is working perfectly with most TV shows EXCEPT for Agents of SHIELD. My setup will auto grab torrents from showrss, rpc to transmission, and then move/rename the show to respective folders. Problem is Agents of SHIELD always yields error which I am not able to solve.

Here’s my TV related config:

# sorting task
  sort-TV_Series:
    priority: 20
    find:
      path: /share/HDA_DATA/Download/transmission/completed
      regexp: '.*\.(avi|mkv|mp4)$'
      recursive: yes
    accept_all: yes
    seen: local
    # this is needed for the episode names
    thetvdb_lookup: yes
    metainfo_series: yes
    all_series:
      parse_only: yes
    series:
      - Marvels Agents of S.H.I.E.L.D.
      - Agents of S.H.I.E.L.D.
      - Marvel's Agents of S.H.I.E.L.D.
    move:    
      to: /share/HDA_DATA/TV_Series/{{series_name}}
      # save the file as "Series Name - SxxEyy - Episode Name.ext"
      filename: '{{ tvdb_series_name }} - {{ series_id }} - {{ tvdb_ep_name }}{{ location | pathext }}'
      clean_source: 100

The files are named:

Agents.of.S.H.I.E.L.D.S01E01.Pilot.720p.WEB-DL.x264.AAC.mp4                     
Agents.of.S.H.I.E.L.D.S01E02.0-8-4.720p.WEB-DL.x264.AAC.mp4           
[etc for all 22 episodes]

The error log for this is:

2014-06-05 12:02 ERROR    move          sort-TV_Series  Filename value replacement `{{ tvdb_series_name }} - {{ series_id }} - {{ tvdb_ep_name }}{{ location | pathext }}` failed for `Agents.of.S.H.I.E.L.D.S01E01.Pilot.720p.WEB-DL.x264.AAC`
2014-06-05 12:02 ERROR    move          sort-TV_Series  Filename value replacement `{{ tvdb_series_name }} - {{ series_id }} - {{ tvdb_ep_name }}{{ location | pathext }}` failed for `Agents.of.S.H.I.E.L.D.S01E02.0-8-4.720p.WEB-DL.x264.AAC`
2014-06-05 12:02 ERROR    exec          sort-TV_Series  Could not set exec command for Agents.of.S.H.I.E.L.D.S01E01.Pilot.720p.WEB-DL.x264.AAC: (UndefinedError) 'tvdb_series_name' is undefined
2014-06-05 12:02 ERROR    exec          sort-TV_Series  Could not set exec command for Agents.of.S.H.I.E.L.D.S01E02.0-8-4.720p.WEB-DL.x264.AAC: (UndefinedError) 'tvdb_series_name' is undefined

I’ve tried manually renaming the title form Agents.of.S.H.I.E.L.D.S0XE0X.XXXXXXXX to Marvels.Agents.of.S.H.I.E.L.D.S0XE0X.XXXXXXXX. But it is also not working:

2014-06-06 12:02 ERROR    move          sort-TV_Series  Filename value replacement `{{ tvdb_series_name }} - {{ series_id }} - {{ tvdb_ep_name }}{{ location | pathext }}` failed for `Marvels.Agents.of.S.H.I.E.L.D.S01E02.0-8-4.720p.WEB-DL.x264.AAC`
2014-06-06 12:02 ERROR    move          sort-TV_Series  Filename value replacement `{{ tvdb_series_name }} - {{ series_id }} - {{ tvdb_ep_name }}{{ location | pathext }}` failed for `Marvels.Agents.of.S.H.I.E.L.D.S01E01.Pilot.720p.WEB-DL.x264.AAC`
2014-06-06 12:02 ERROR    exec          sort-TV_Series  Could not set exec command for Marvels.Agents.of.S.H.I.E.L.D.S01E02.0-8-4.720p.WEB-DL.x264.AAC: (UndefinedError) 'tvdb_series_name' is undefined
2014-06-06 12:02 ERROR    exec          sort-TV_Series  Could not set exec command for Marvels.Agents.of.S.H.I.E.L.D.S01E01.Pilot.720p.WEB-DL.x264.AAC: (UndefinedError) 'tvdb_series_name' is undefined

I am totally confused cause my configuration is working perfectly for almost all my shows.

Is anyone having this problem with Agents of SHIELD?

All the errors revolve around the section of your config

filename: '{{ tvdb_series_name }}

see

'tvdb_series_name' is undefined

which is not uncommon with tvdb it has a history of this. But you shouldn’t need all 3 of those i wouldn’t think. least I didn’t. you could try to use trakt.tv plugin to get your names seeing as they come from tvdb anyway.

A few things:

  • You should only list the series once in the series plugin. Listing multiple forms will mess up the series progression. If you need multiple forms to match you can use the alternate_name option for the series.
  • If you list the main title of the show exactly as you want it in your renaming scheme, you can now use the series_name field instead of tvdb_series_name to avoid a lookup for that field.
  • The lookup for tvdb show is probably failing because the name as you have it listed doesn’t match how tvdb has it. If you make your main title for the series in series plugin same, or closer, to tvdb naming, this should be resolved. If you need it to be different, you can manually set the tvdb_id for the show as shown at the top of the thetvdb_lookup wiki page.

Change you filename line to:
filename: ‘{{ series_name }} - {{ series_id }} - {{ tvdb_ep_name }}’

That should keep the format you want without the errors. The extension should be appended automatically so you don’t need to add anything for it to be added.

I had the same trouble with Marvel’s Agents of S.H.I.E.L.D

I took some of the advice here and got it to successfully parse with the following directives in (sort-series:)

series:
  - "Marvel's Agents of S.H.I.E.L.D.":
      name_regexp: ^marvel(')?s.agents.of.(s.h.i.e.l.d.?|shield)
move:
  to: /your/path/{{ tvdb_series_name }}/Season {{series_season}}
  filename: '{{ series_name }} - {{ series_id }} - {{ tvdb_ep_name }}'

I solved this problem with a quick manipulate to make it work with TVDB.

manipulate:
  - series_name:
      phase: filter
      replace:
        regexp: s.h.i.e.l.d
        format: "S.H.I.E.L.D."
metainfo_series: yes
thetvdb_lookup: yes
require_field: [series_name, series_id, tvdb_series_name]

I do have thsi problem with more series like hawai five -0