Quantcast
Channel: help - Forum - FlexGet
Viewing all articles
Browse latest Browse all 837

How to purge torrents when space is almost full?

$
0
0

@Curtis wrote:

let's say i want to achieve this, using crontab to schedule flexget to run, using rss to add torrents, and purging torrents when space is almost full.
now i mentioned that there's only one plugin that can do that job, which is free_space, "will abort a task if free space on a given drive is getting low."
so here's my config.yml

tasks:
  test: 
    rss: 
      url: blablabla
    free_space: 
      path: blablabla
      space: 50000
    transmission:
      <<: *transmission
      action: add  
    run_task:
      when: aborted
      task: clean_tr
    
  clean_tr:
    manual: yes
    from_transmission:
      <<: *transmission
    disable: [seen, seen_info_hash]
    if:
      - transmission_date_active < now - timedelta(hours=2) and transmission_date_added < now - timedelta(days=2): accept
    transmission:
      <<: *transmission
      action: purge

it worked out fine at first but it soon proved to be unreliable, there's lots of cases can cause task "test" to be aborted, for example, failed to get rss or torrent for network reason, which is unfortunately within "aborted" range, so under this circumstance, task "clean_tr" is going to be run, which is what i'm not expected.

from my perspective, there's two solutions, both can improve plugin's flexibility and be more specific about what's going on.
first, plugin "run_task" can specify abort reasons. if it's network error, then ignore, if it's caused by "free_space", then run task "clean_tr"
second, currently free_space, "will abort a task if free space on a given drive is getting low.", but what if it can not just abort this task? i can schedule a task to clean space when space is low, and currently, free_space would only abort task.

or is there some other ways to fulfill my requirements?

again, thanks for all your efforts, flexget is really a useful tool for me!

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 837

Trending Articles