1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-23 19:55:38 +01:00

select_quality: just show a better error message when a specified quality is not available

This commit is contained in:
Johan Andersson 2021-05-16 21:40:01 +02:00
parent ee940cc207
commit 0e8e64b478

View File

@ -151,9 +151,7 @@ def select_quality(config, streams):
# If none remains, the bitrate filtering was too tight.
if len(wanted) == 0:
data = sort_quality(streams)
quality = ", ".join(f"{str(x)} ({str(y)})" for x, y in data)
raise error.UIException("Can't find that quality. Try one of: %s (or " "try --flexible-quality)" % quality)
raise error.UIException("Can't find that quality. Try a different one listed in --list-quality or try --flexible-quality")
http = HTTP(config)
# Test if the wanted stream is available. If not try with the second best and so on.