Quantcast
Channel: configuration - Forum - FlexGet
Viewing all articles
Browse latest Browse all 716

Make my first script better =)

$
0
0

@malvack wrote:

Hi,

Below is my first script i made and it works okey. I think its to messy tho and want some help to make it a bit more efficient.

It download from a showrss rss and put it to transmission.
After that the script runs a get subtitle with subliminal plugin and add it to the folder where the finish download is.
Then the sort plugin take over and move the files to the right place and notify me with pushover.
Then it clears the transmiossion client from downloaded files.

The problem i have is that the finished download lands in the folder where the root folder for the series is places. This is very annoying because i need to remove the folder by hand because the subtitle files is still in the folder and clear transmission cant remove that folder.

Also the subtitle task download subtitle to the unfinished torrent sometimes and it makes is so it dont download to the finished folder.I need to move the subtitle by hand.

Please help me to make it a bit more efficent =)

schedules:
  - tasks: '*'
    interval:
      hours: 4

tasks:
  # downloading task
  download-rss:
    rss: http://showrss.info/user/21045.rss?magnets=true&namespaces=true&name=null&quality=hd&re=null
    # fetch all the feed series
    all_series: yes
    # use transmission to download the torrents
    transmission:
      host: xxx
      port: xxx
      username: xxx
      password: xxx
      ratio: -1.0
      addpaused: No
    content_filter:
      require:
        - '*.avi'
        - '*.mkv'
      reject:
        - '*.wmv'
    set:
      path: /volume1/video/serier/temp/

  #Get subtitles
  get-subtitles:
    filesystem:
      path:
        - /volume1/video/serier
      regexp: '.*\.(avi|mkv|mp4)$'
      recursive: yes
    accept_all: yes
    seen: local
    subliminal:
      languages:
        - eng
      exact_match: no
      #only use the following providers
      providers:
        - opensubtitles
        - tvsubtitles
      authentication:
      #consider using the variables plugin
        opensubtitles:
          username: xxx
          password: xxx
    retry_failed:
      retry_time: 10 seconds
      retry_time_multiplier: 1
      max_retries: 1

  # sorting task
  Sort-Series:
    filesystem:
      # directory with the files to be sorted
      path:
        - /volume1/video/serier/
      # fetch all avi, mkv and mp4 files, skips the .part files (unfinished torrents)
      regexp: '.*\.(avi|mkv|mp4|srt)$'
      recursive: yes
    accept_all: yes
    seen: local
    # this is needed for the episode names
    metainfo_series: yes
    thetvdb_lookup: yes
    all_series:
      # for some reason all_series rejects all episodes here, even with seen: local, so parse_only must be added
      parse_only: yes
    # TVDB doesn't recognise "Adventure Time with Finn and Jake" so you must add such exceptions here manually
    series:
      group_name:
        - Outlander
        - "Fear the walking dead"
        - "Once Upon A Time"
        - The Big Bang Theory
        - Teen Wolf
    move:
      # this is where the series will be put
      to: /volume1/video/serier/{{ tvdb_series_name }}/Season {{ series_season }}/
      # save the file as "Series Name - SxxEyy - Episode Name.ext"
      rename: '{{ tvdb_series_name }} - {{ series_id }} - {{ tvdb_ep_name }}{{ location | pathext }}'

    # Pushover notify
    notify:
      entries:
        title: Laddat ner {{tvdb_series_name}}
        message: Episod {{ series_id }} - {{ tvdb_ep_name }}
        via:
          - pushover:
              user_key:
                -  xxx
              api_key: xxx
              device: xxx

  #Clean Transmission
  clean:
    clean_transmission:
      host: xxx
      port: xxx
      username: xxx
      password: xxx
      delete_files: Yes

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 716

Trending Articles