Skip to content

I want to filter the size of torrent before download #3801

Answered by gazpachoking
lilws asked this question in Q&A
Discussion options

You must be logged in to vote

We have the content_size plugin which can be used to filter based on size. It relies on other plugins to get that size from either a torrent or nzb file.
If you have a reliable size in the title, you can rely on that instead by filling in the 'content_size' field with the set plugin. There is a jinja filter we provide (which I noticed wasn't documented until I added it a couple minutes ago) that can help.

content_size:
  min: 10240
  max: 20480
set:
  # The content_size plugin expects the 'content_size' field to be in mebibytes, but the parse_size filter returns in bytes
  content_size: "{{ title|parse_size / 1024 / 1024 }}"

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@lilws
Comment options

Answer selected by lilws
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants