Sort_by file size, ascending?

Quick question: I would like to sort my Input by filesize, ascending so that the smallest file is chosen first. That way I can increase my quality filter a little because a file with a better compression method will be chosen. Ideally, I’d love Flexget to choose any 720p, x265 files it finds first. Then the smallest 480p SDTV. I do have filesize limitations but Flexget still wants the biggest file under that max.

When I tried:

configure_series:
  settings:
    quality: "<=720p" "!x264"
    sort_by: size ## (or filesize???)
      reverse: no
  from:
    trakt_list:
      bla:
      bla:

or

    quality: "<=720p" "!x264"
    sort_by: 
      field: size  ##    (or filesize???)
      reverse: no ....

I get a syntax error that this plugin is not appropriate here on the “sort_by” line (sorry I don’t have the quote but you know the one I mean.) I tried various indents and dashes. I thougt of using the set command in my tv template but I tried and got the same error.

…Wait. Maybe:

sort_by:
  field: size.file ### or file.size???  or content_size???
  reverse: no

Last idea:

list_match:
  from:
    search_rss: 
      - rarbg:
          category: 41
          order_by: size
          reverse: no

Oh, BTW. When I tried to use quality: 720+ somewhere Flexget said the syntax was bad. It also rejected h264 and h265 files when I used: quality: “>=720p”, and also quality: 720p SDTV. I WANT 720p x265, but not x264. And SDTV as minimum. No idea how to get that.

Thanks a lot in advance.

correct field for size is content_size, you can see all the known fields from an entry here

For the quality, i think if you specify it as a list of qualities, flexget will respect that something like

quality:
  - 720p x265
  - 480p sdtv

Or maybe something like (telling the expected resolution, source and codec):

quality: "480p-720p sdtv+ x265"

OK. Thank you. I’ll try those.

Neither of these worked in my latest attempts. Sorry I don’t remember the errors. The last one said that x265 was an invalid quality.

What I want to do is: “<=720p” and sort it by size ascending so that I get the smallest file it finds.

The reason I want to include 720p at all is because some obscure shows, especially documentaries, only come in 720p. So in my list of hundreds of shows I want 720p only if it’s the only thing available. Generally I want the smallest file size available…

I wonder if I should make 2 tasks for the same lists with different size requirements. Then lower the priority on the larger file sizes so that Flexget tries to find small files first, then broadens its search for shows not found yet.

I’ll try this but please consider making a size plugin that can find the smallest (or biggest) file size to simplify things for us. Let me know if I need to open an issue.

I also want to say that the quality plugin is crazy-complicated. I expected to be able to put 720p, and that would include webdl or 5.1 or x264 or x265. But I got lots of rejections for the latter qualities. It seems to exclude qualities by default instead of including them.

I think most people would expect to only exclude, say 2.0 sound, if they don’t want it but otherwise assume all other qualities would be included with 720p or HDTV.