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: Fix mvp player on WSL 2 #1478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WildanBusiness
Copy link

@WildanBusiness WildanBusiness commented Jan 23, 2025

Pull Request Template

Type of change

  • Bug fix
  • Feature
  • Documentation update

Description

ramble here

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
  • --skip ani-skip works
  • --skip-title ani-skip title argument works
  • --no-detach no detach 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)

@@ -350,7 +350,7 @@ quality="${ANI_CLI_QUALITY:-best}"
case "$(uname -a | cut -d " " -f 1,3-)" in
*Darwin*) player_function="${ANI_CLI_PLAYER:-$(where_iina)}" ;; # mac OS
*ndroid*) player_function="${ANI_CLI_PLAYER:-android_mpv}" ;; # Android OS (termux)
*MINGW* | *WSL2*) player_function="${ANI_CLI_PLAYER:-mpv.exe}" ;; # Windows OS
*MINGW* | *WSL2*) player_function="${ANI_CLI_PLAYER:-mpv}" ;; # Windows OS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will make WSL use the mpv installed in WSL (which is what you wanted probably), but it'll break git bash because it also matches with *MINGW*, and it won't find mpv (but does find mpv.exe)

A better solution would be to remove the *WSL2* option and let it default to mpv, or even better for you to export the env var ANI_CLI_PLAYER as mpv

@Lockl00p
Copy link
Contributor

Truly the most valuable player

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.

3 participants