pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
7.44k stars 530 forks source link

fix: multi-selection support #1224

Closed AzureOrange404 closed 9 months ago

AzureOrange404 commented 9 months ago

Pull Request

Type of change

Description

The check for [ $use_external_menu = 0 | 1 ] was made before the variable even gets a chance to be changed and use_external_menu was set to 0 just before that if ani-cli was started from a terminal.

BEFORE multi-selection (from the terminal with --rofi set) only worked if the env variable $ANI_CLI_EXTERNAL_MENU was set or ani-cli was not started from a terminal.

NOW multi-selection also works if the --rofi flag is set in via terminal, because the check takes place AFTER parcing command-line-arguments.

Checklist

Additional Testcases

Derisis13 commented 9 months ago

it works, but I would've preferred an if-else structure