mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-05 20:40:09 -08:00
feat: limit quality selection to what's available from servers
This change affects all providers. It limits the selection if the servers don't implement multiple qualities, ensuring that only qualities actually available are displayed to the user.
This commit is contained in:
@@ -249,7 +249,8 @@ def _change_quality(ctx: Context, state: State) -> MenuAction:
|
||||
return InternalDirective.BACK
|
||||
|
||||
new_quality = selector.choose(
|
||||
"Select a different server:", list(["360", "480", "720", "1080"])
|
||||
"Select a different quality:",
|
||||
[link.quality for link in state.provider.server.links],
|
||||
)
|
||||
if new_quality:
|
||||
ctx.config.stream.quality = new_quality # type:ignore
|
||||
|
||||
Reference in New Issue
Block a user