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

Add iOS support to ani-cli #1105

Merged
merged 15 commits into from
Apr 29, 2023
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ A cli to browse and watch anime (alone AND with friends). This tool scrapes the
- [Windows](#Windows)
- [Android](#Android)
- [Steam Deck](#Steam-deck)
- [iOS](#iOS)
- [Uninstall](#Uninstall)
- [Dependencies](#Dependencies)
- [Homies](#Homies)
Expand Down Expand Up @@ -212,6 +213,18 @@ rm -rf ani-cli

For players you can use the apk (playstore/fdroid) versions of mpv and vlc. Note that these cannot be checked from termux so a warning is generated when checking dependencies.

### iOS
Install VLC from app store
port19x marked this conversation as resolved.
Show resolved Hide resolved
-
Make sure apk is updated using
```apk update```
then paste this:
```sh
apk add grep sed curl fzf git ffmpeg aria2
git clone https://github.com/pystardust/ani-cli.git ~/.ani-cli
cp ~/.ani-cli/ani-cli /usr/local/bin/ani-cli
```

### Steam Deck

#### Copypaste script:
Expand Down
6 changes: 5 additions & 1 deletion ani-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version_number="4.2.3"
version_number="4.2.4"

# UI

Expand Down Expand Up @@ -231,6 +231,7 @@ play_episode() {
*yncpla*) nohup "$player_function" "$episode" -- --force-media-title="${allanime_title}episode-${ep_no}-${mode}" >/dev/null 2>&1 & ;;
download) "$player_function" "$episode" "${allanime_title}episode-${ep_no}-${mode}" ;;
catt) nohup catt cast "$episode" >/dev/null 2>&1 & ;;
iSH) printf "\e]8;;vlc-x-callback://x-callback-url/stream?url=%s&filename=%sepisode-%s-%s\a~~~~~~~~~~~~~~~~~~~~\n~ Tap to open VLC ~\n~~~~~~~~~~~~~~~~~~~~\e]8;;\a\n" "$episode" "$allanime_title" "$ep_no" "$mode";sleep 5 ;;
port19x marked this conversation as resolved.
Show resolved Hide resolved
*) nohup "$player_function" "$episode" >/dev/null 2>&1 & ;;
esac
replay="$episode"
Expand Down Expand Up @@ -275,6 +276,7 @@ case "$(uname -a)" in
*ndroid*) player_function="${ANI_CLI_PLAYER:-android_mpv}" ;; # Android OS (termux)
*steamdeck*) player_function="${ANI_CLI_PLAYER:-flatpak_mpv}" ;; # steamdeck OS
*MINGW*) player_function="${ANI_CLI_PLAYER:-mpv.exe}" ;; # Windows OS
*ish*) player_function="${ANI_CLI_PLAYER:-iSH}" ;; # iOS (iSH)
*) player_function="${ANI_CLI_PLAYER:-mpv}" ;; # Linux OS
esac

Expand All @@ -296,6 +298,7 @@ while [ $# -gt 0 ]; do
case "$(uname -a)" in
*ndroid*) player_function="android_vlc" ;;
MINGW*) player_function="vlc.exe" ;;
*iSH*) player_function="iSH" ;;
*) player_function="vlc" ;;
esac
;;
Expand Down Expand Up @@ -345,6 +348,7 @@ case "$player_function" in
flatpak info io.mpv.Mpv >/dev/null 2>&1 || die "Program \"mpv (flatpak)\" not found. Please install it."
;;
android*) printf "Checking of players on Android is disabled\n" ;;
*iSH*) printf "Checking of players on iOS is disabled\n" ;;
*) dep_ch "$player_function" ;;
esac

Expand Down