<commit_before>secrets: secrets.yml

templates:
  transmission series:
    transmission:
      host: 192.168.253.52
      port: 9091
      username: '{{ secrets.tr.usr }}'
      password: '{{ <PASSWORD> }}'
      path: '{{ secrets.tr.root }}'
    set:
      path: '{{ secrets.tr.root }}/{{ series_name }}'
      label: 'FlexGet series - {{ series_name }}'

  ongoings:
    include: series.yml
    thetvdb_lookup: yes
    digest: daily email

  fix quality:
    if:
      - "not quality":
          set:
            quality: 720p


  horrible quality:
    if:
      - "all(['HorribleSubs' in title,'1080p' in quality])":
          set:
            quality: 480p
      - "all(['HorribleSubs' in title,'720p' in quality])":
          set:
            quality: 576p

tasks:
  fetch nyaa:
    priority: 2
    template:
      - ongoings
      - fix quality
      - transmission series
    rss:
      url: 'http://www.nyaa.se/?page=rss&cats=1_37&term=mkv+-horriblesubs+-1080p+-480p+-dvdrip+-%22bd%22&filter=2'
      all_entries: no

  fetch horrible:
    priority: 5
    template:
      - ongoings
      - horrible quality
      - transmission series
    rss:
      url: 'http://www.nyaa.se/?page=rss&cats=1_37&term=mkv+horriblesubs+-1080p+-480p&filter=2'
      all_entries: no

  discover nyaa:
    priority: 10
    template:
      - ongoings
      - horrible quality
      - fix quality
      - transmission series
    discover:
      what:
        - emit_series:
            from_start: yes
            backfill: yes
      from:
        - nyaa:
            category: anime eng
            filter: trusted only

  mail digest:
    priority: 20
    emit_digest:
      list: daily email
    disable:
      - seen
      - seen_info_hash
    accept_all: yes
    email:
      from: '{{ secrets.mail.user }}'
      to: '{{ secrets.mail.to }}'
      smtp_host: 'smtp.mailgun.com'
      smtp_login: true
      smtp_username: '{{ secrets.mail.user }}'
      smtp_password: '{{ <PASSWORD> }}'
      smtp_tls: true
      template: 'series.template'

schedules:
  - tasks: [fetch nyaa, fetch horrible]
    interval:
      minutes: 30

  - tasks: mail digest<commit_msg>Update config.yml<commit_after>secrets: secrets.yml

templates:
  transmission series:
    transmission:
      host: 192.168.253.52
      port: 9091
      username: '{{ secrets.tr.usr }}'
      password: '{{ <PASSWORD> }}'
      path: '{{ secrets.tr.root }}'
    set:
      path: '{{ secrets.tr.root }}/{{ series_name }}'
      label: 'FlexGet series - {{ series_name }}'

  ongoings:
    include: series.yml
    thetvdb_lookup: yes
    digest: daily email

  fix quality:
    if:
      - "not quality":
          set:
            quality: 720p


  horrible quality:
    if:
      - "all(['HorribleSubs' in title,'1080p' in quality])":
          set:
            quality: 480p
      - "all(['HorribleSubs' in title,'720p' in quality])":
          set:
            quality: 576p

tasks:
  fetch nyaa:
    priority: 2
    template:
      - ongoings
      - fix quality
      - transmission series
    rss:
      url: 'http://www.nyaa.se/?page=rss&cats=1_37&term=mkv+-horriblesubs+-1080p+-480p+-dvdrip+-%22bd%22&filter=2'
      all_entries: no

  fetch horrible:
    priority: 5
    template:
      - ongoings
      - horrible quality
      - transmission series
    rss:
      url: 'http://www.nyaa.se/?page=rss&cats=1_37&term=mkv+horriblesubs+-1080p+-480p&filter=2'
      all_entries: no

  discover nyaa:
    priority: 10
    template:
      - ongoings
      - horrible quality
      - fix quality
      - transmission series
    discover:
      what:
        - emit_series:
            from_start: yes
            backfill: yes
      from:
        - nyaa:
            category: anime eng
            filter: trusted only

  mail digest:
    priority: 20
    emit_digest:
      list: daily email
    disable:
      - seen
      - seen_info_hash
      - torrent
    accept_all: yes
    email:
      from: '{{ secrets.mail.user }}'
      to: '{{ secrets.mail.to }}'
      smtp_host: 'smtp.mailgun.com'
      smtp_login: true
      smtp_username: '{{ secrets.mail.user }}'
      smtp_password: '{{ <PASSWORD> }}'
      smtp_tls: true
      template: 'series.template'

schedules:
  - tasks: [fetch nyaa, fetch horrible]
    interval:
      minutes: 30

  - tasks: mail digest
{'fraction_non_alphanumeric': 0.12072155411655874, 'fraction_numerical': 0.030064754856614247, 'mean_word_length': 1.9302168021680217, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3692625', 'n_tokens_mistral': 1542, 'n_tokens_neox': 1409, 'n_words': 319}