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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ani-cli
Original file line number Diff line number Diff line change
Expand Up @@ -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

*ish*) player_function="${ANI_CLI_PLAYER:-iSH}" ;; # iOS (iSH)
*) player_function="${ANI_CLI_PLAYER:-$(where_mpv)}" ;; # Linux OS
esac
Expand Down