Skip to content

Instantly share code, notes, and snippets.

@Ram-Z
Last active August 29, 2015 14:13
Show Gist options
  • Save Ram-Z/903c62902bf258138dd1 to your computer and use it in GitHub Desktop.
Save Ram-Z/903c62902bf258138dd1 to your computer and use it in GitHub Desktop.
tasks:
move-tv: # {{{2
priority: 2
seen: local
disable_builtins: [retry_failed]
no_entries_ok: yes
find:
path:
- /mnt/Skaro/usenet/done
- /mnt/Skaro/torrents/done
recursive: yes
regexp: '.*\.(avi|mkv|mp4|mpg|divx|webm)$'
regexp:
reject:
- '[Ss]ample'
thetvdb_lookup: yes
all_series:
parse_only: yes
accept_all: yes
set:
destination: '/mnt/Skaro/Series'
folder: "{{tvdb_series_name}}/{% if tvdb_season == 0 %}Specials{% else %}Season {{tvdb_season}}{% endif %}"
filename: "{{tvdb_season}}x{{tvdb_episode|pad(2)}} {{tvdb_ep_name|replace('/','-')}} ({{tvdb_ep_air_date|formatdate('%Y')}})❯
move:
to: "/mnt/Skaro/Series/{{folder}}"
filename: "{{filename}}"
clean_source: 100 # removes dir if < [N] MB
exec: echo "<<<{{folder}}/{{filename}}>>>"
email:
from: flexget@tardis
to: ramsi@localhost
template: move
{% if task.accepted -%}
{%- for group in task.accepted|groupby('task') %}
FlexGet has just downloaded {{group.list|length}} new entries for task {{group.grouper}}:
{%- for entry in group.list %}
- {{entry.location|pathbase}}
=> {% if entry.folder %}{{entry.folder}}/{% endif %}{{entry.filename}}
{%- endfor %}
{% endfor %}
{% endif -%}
{% if task.failed -%}
The following entries have failed for task {{task.name}}:
{%- for entry in task.failed %}
- {{entry.title}} Reason: {{entry.reason|d('unknown')}}
{% endfor %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment