After timeframe expires, best quality found is downloaded even if a better match to target is available

tremby asked for this feature over 2 years ago — 3 comments

tremby commented over 2 years ago

From https://github.com/Flexget/Flexget/issues/699 (2015-12-12), edited slightly:

From http://flexget.com/ticket/3105

Consider a configuration such as

timeframe: 2 hours
target: 720p webdl
quality: 720p-1080p hdtv+

and the following scenario:

Flexget finds a suitable episode in two formats: 720p hdtv and 1080p hdtv, whether at the same time or within two hours of each other. Due to them not fulfilling the "webdl" requirement of the target quality it correctly doesn't download anything yet.

The timeframe then expires and there is still no 720p webrip available.

At this point, Flexget's current behaviour is to download the best quality it has seen, which in this case is the 1080p hdtv.

This may be what is wanted, but it also may not be. It's not what I want, and I would imagine that most users would agree that in this scenario the 720p hdtv would be more appropriate, since the resolution matches the target, and the source (though not matching the target) is in the valid quality range. On the other hand, the 1080p hdtv, which was downloaded, does not match the target resolution (though it is in the valid range) and the source also does not match the target (though again it is in the valid range).

I think the default behaviour should be to match as many of the target requirements as possible, while of course staying within the quality requirements.

If it seems not all users would want this new default behaviour, it could be configurable. It could either be a "choose closest match: yes or no" option, or it could be more sophisticated with the "target" option expanded. A user who wants "720p webrip" could somehow specify that the 720p part is important, and the webrip part not so important, or some other such combination.

liiight asked in a comment on the old ticket:

if you don't want 1080p to begin with? why even include it in the original requirement? if that is not a valid option on your part, do not include it.

i'm not saying i'm against adding a 'closest match' feature, that does sound interesting and doable, i'm just wondering.

The answer is that I do want 1080p if no 720p is available, but I prefer 720p. At present I have no way to tell Flexget that I prefer a "worse" quality. Or, more accurately, I sort of am able to tell Flexget that -- that's what I'm saying in the "target" -- but it isn't taken into account in this way when timeframe expires.

@crawln45 says:

You specified a rant of 720p-1080p at hdtv or above. 1st it's going to pick the 'best' qualities available. If you wish that it doesn't. Then that is up to you to specify. If you specify a range well then it's going to give you the best of that range since there's not a single option.

Well yes, that's the problem, that's why I opened this ticket. I specify as "target" 720p webdl, so it ought to be obvious that I prefer 720p webdl. But whether that means I prefer 720p hdtv over 1080p hdtv, if these end up being the only available options, is admittedly unclear. I want an option which allows me to make this clear to flexget.

All assigned values for qualities are given a numeric value. Those values are then totaled giving you a numeric weight to each episode, as long as the values are within the range assigned. That is then calculated on what episode is the 'best'. So there's no way currently to assign 720p as important over 1080p since their values are treated equally when added to the other values present.

So I want a way to configure these weights.

@crawln45 then suggested:

@liiight thoughts making a new option per quality list:

target: - 720p hdtv: priority: 2 - 1080p hdtv: priority: 3 - 1080p webdl: priority: 1

This way it selects the best out of that list if found on which one you would rather have after timeframe. Else revert to a quality setting.

I agreed that this seems like a decent solution, as did @pesho-shaibata.

@paranoidi disagreed, saying it was making what is already a confusing option more so, and added:

Quality option could be improved to take list of requirements in the order of preferece.

@vincentbernat then said:

I would also be interested to be able to specify an ordered list of preferences (or even an unordered list). For example, I want to be able to express that I accept "720p h264" and "720p|1080p h265". I don't want to accept "1080p h264". I think, this is currently not possible.

Another option for me would be to be able to have something like that:

         timeframe: 12 hours
        target: 1080p dd5.1|ac3|dts|dtshd
          - "720p|1080p webrip|hdtv|webdl|bluray h265 !aac"
          - "720p webrip|hdtv|webdl|bluray h264 !aac"

Unfortunately, the quality setting of the serie plugin doesn't support a list (while the quality plugin does, this is a bit confusing).

@mabo1 suggested:

Would the reorder_quality plugin solve this problem?

    above: 1080p

| tremby commented over 2 years ago

I admit I hadn't seen @mabo1's suggestion until now. It does sound like it would do what I'm looking for, but the documentation on reorder_quality is somewhat scant. It's something I'll definitely try. I'd still like to hear more thoughts on this suggested feature, however, since I think it would be more powerful.

gazpachoking commented 7 months ago Admin

With newer versions, series plugin no longer uses quality to prioritize which entry it thinks is best, it uses the order in the task. This means you can use sort_by plugin to reorder the entries in the task based on your own requirements.

Join the discussion!

with GitHub to comment