Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: multi-selection support #1224

Merged
merged 2 commits into from Oct 16, 2023

Conversation

AzureOrange404
Copy link
Contributor

@AzureOrange404 AzureOrange404 commented Oct 7, 2023

Pull Request

Type of change

  • Bug fix for issue 1225
  • Feature
  • Documentation update

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

  • any anime playing
  • bumped version

  • next, prev and replay work
  • -c history and continue work
  • -d downloads work
  • -s syncplay works
  • -q quality works
  • -v vlc works
  • -e select episode works
  • -S select index works
  • -r range selection works
  • --dub and regular (sub) mode both work
  • all providers return links (not necessarily on a single anime, use debug mode to confirm)

  • -h help info is up to date
  • Readme is up to date
  • Man page is up to date

Additional Testcases

  • The safe bet: One Piece
  • Episode 0: Saenai Heroine no Sodatekata ♭
  • Unicode: Saenai Heroine no Sodatekata ♭
  • Non-whole episodes: Tensei shitara slime datta ken (ep. 24.5, ep. 24.9)

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.
@AzureOrange404 AzureOrange404 changed the title Bugfix for multi-selection support fix: for multi-selection support Oct 7, 2023
@justchokingaround justchokingaround changed the title fix: for multi-selection support fix: multi-selection support Oct 16, 2023
@justchokingaround justchokingaround removed the request for review from Derisis13 October 16, 2023 11:45
@justchokingaround justchokingaround merged commit 9ab1c5a into pystardust:master Oct 16, 2023
8 checks passed
@Derisis13
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants