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.