sort input list by input name

patch bump
This commit is contained in:
onyx-and-iris 2025-06-07 00:24:48 +01:00
parent fd2baf3350
commit 1a1fbf1da1
2 changed files with 11 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025-present onyx-and-iris <code@onyxandiris.online> # SPDX-FileCopyrightText: 2025-present onyx-and-iris <code@onyxandiris.online>
# #
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
__version__ = "0.16.7" __version__ = "0.16.8"

View File

@ -45,13 +45,16 @@ def list_(
if not any([input, output, colour, ffmpeg, vlc]): if not any([input, output, colour, ffmpeg, vlc]):
kinds = ['input', 'output', 'color', 'ffmpeg', 'vlc'] kinds = ['input', 'output', 'color', 'ffmpeg', 'vlc']
inputs = [ inputs = sorted(
(input_.get('inputName'), input_.get('inputKind')) (
for input_ in filter( (input_.get('inputName'), input_.get('inputKind'))
lambda input_: any(kind in input_.get('inputKind') for kind in kinds), for input_ in filter(
resp.inputs, lambda input_: any(kind in input_.get('inputKind') for kind in kinds),
) resp.inputs,
] )
),
key=lambda x: x[0], # Sort by input name
)
if not inputs: if not inputs:
out_console.print('No inputs found.') out_console.print('No inputs found.')