Skip to content

Commit

Permalink
feat: ani-sync on windows (#700)
Browse files Browse the repository at this point in the history
* feat: ani-sync on windows

* refactor: remove whitespace

* refactor: merge windows uname cases

* chore: -s demo in help menu

* docs: added matrix and revolt to README

* chore: remove unecessary space

* advise usage of native termux package

Co-authored-by: chokerman <[email protected]>
Co-authored-by: port19 <[email protected]>
  • Loading branch information
3 people authored May 5, 2022
1 parent 2dadb94 commit ff40321
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<img src="https://img.shields.io/badge/os-android-brightgreen">
<br>
<a href="https://discord.gg/aqu7GpqVmR"><img src="https://invidget.switchblade.xyz/aqu7GpqVmR"></a>
<h3 align="center">
You can also join us on Matrix or on Revolt.
</h3>
<h1 align="center">
<a href="https://matrix.to/#/#ani-cli:matrix.org"><img src="https://element.io/blog/content/images/2020/07/Logomark---white-on-green.png" width="80"></a>
<a href="https://nightly.revolt.chat/invite/4FKHbs78"><img src="https://developers.revolt.chat/img/logo.png" width="80"></a>
<br>
<a href="https://github.com/port19x"><img src="https://img.shields.io/badge/lead-port19x-lightblue"></a>
<a href="https://github.com/CoolnsX"><img src="https://img.shields.io/badge/maintainer-CoolnsX-blue"></a>
Expand All @@ -19,7 +25,7 @@
</p>

<h3 align="center">
A cli to browse and watch anime. This tool scrapes the site <a href="https://gogoplay5.com">gogoplay.</a>
A cli to browse and watch anime (alone AND with friends). This tool scrapes the site <a href="https://gogoplay5.com">gogoplay.</a>
</h3>

<h1 align="center">
Expand All @@ -44,8 +50,8 @@ https://user-images.githubusercontent.com/44473782/160729779-41fe207c-b5aa-4fed-

## Fixing errors

if you encounter "Video url not found" or any breaking issue, then make sure you are on latest version by typing
`sudo ani-cli -U` to update on linux, mac and android. On windows, run gitbash as administrator then there type `ani-cli -U`.
If you encounter "Video url not found" or any breaking issue, then make sure you are on latest version by typing
`sudo ani-cli -U` to update on Linux, Mac and Android. On Windows, run gitbash as administrator then there type `ani-cli -U`.
If after this the issue persists then open an issue.
<br>
If you see sed warnings or your history entries have disappeared after updating, then update your history file with the history transition script.
Expand Down Expand Up @@ -112,32 +118,22 @@ source ~/.bashrc
Install termux [(Guide)](https://termux.com/)

```sh
pkg update
pkg install git termux-tools ncurses-utils openssl-tool ffmpeg -y
git clone https://github.com/pystardust/ani-cli && cd ani-cli
cp ani-cli $PREFIX/bin/ani-cli
echo 'am start --user 0 -a android.intent.action.VIEW -d "$1" -n is.xyz.mpv/.MPVActivity' > $PREFIX/bin/mpv
chmod +x $PREFIX/bin/mpv
pkg install ani-cli
```

Install mpv-android [(Link)](https://play.google.com/store/apps/details?id=is.xyz.mpv)

*Add ```referrer="https://gogoplay5.com"``` to mpv.conf (Open mpv app, goto three dots top right->Settings->Advanced-->Edit mpv.conf)*

*Note: VLC android doesn't support referrer option. So it will not work*

## Uninstall

* Arch Linux: ```yay -R ani-cli```
* Other Linux: Just remove the thing from path
* Mac: ```brew uninstall ani-cli```
* Mac: Just remove the thing from path
* Windows: ```scoop uninstall ani-cli```
* Android: Just remove the thing from path

## Dependencies

- grep
- sed
- awk
- curl
- openssl
- mpv - Video Player
Expand Down
19 changes: 10 additions & 9 deletions ani-cli
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
# Project repository: https://github.com/pystardust/ani-cli

# Version number
VERSION="2.1.9"

VERSION="2.2.0"


#######################
Expand All @@ -32,18 +31,19 @@ help_text () {
done <<-EOF
Usage:
${0##*/} [-v] [-q <quality>] [-a <episode>] [-d | -p <download_dir>] [<query>]
${0##*/} [-v] [-q <quality>] -c
${0##*/} [-s] [-v] [-q <quality>] [-a <episode>] [-d | -p <download_dir>] [<query>]
${0##*/} [-s] [-v] [-q <quality>] -c
${0##*/} -h | -D | -U | -V
Options:
-c continue watching anime from history
-v use VLC as the media player
-q set video quality (best|worst|360|480|720|1080)
-s watch anime together with friends, using Syncplay (works with mpv only)
-a specify episode to watch
-h show helptext
-d download episode
-p download episode to specified directory
-q set video quality (best|worst|360|480|720|1080)
-v use VLC as the media player
-c continue watching anime from history
-h show helptext
-D delete history
-U fetch update from github
-V print version number and exit
Expand Down Expand Up @@ -486,7 +486,7 @@ trackma_title="$(printf '%s' "$anime_id" | tr '-' ' ' | awk '{for(i=1;i<=NF;i++)
[ ! "$auto_play" -eq 0 ] && set -- "$@" "--play-and-exit"
set -- "$player_fn" "$video_url" --http-referrer="$refr"
;;
syncplay|/Applications/Syncplay.app/Contents/MacOS/syncplay)
"syncplay"|"/Applications/Syncplay.app/Contents/MacOS/syncplay"|"/c/Program Files (x86)/Syncplay/Syncplay.exe")
set -- "$player_fn" "$video_url" -- --referrer="$refr" --force-media-title="$trackma_title $episode"
;;
*)
Expand Down Expand Up @@ -548,6 +548,7 @@ while getopts 'svq:dp:chDUVa:' OPT; do
s)
case "$(uname -s)" in
Darwin*) player_fn="/Applications/Syncplay.app/Contents/MacOS/syncplay" ;;
MINGW*|*Msys) player_fn="/c/Program Files (x86)/Syncplay/Syncplay.exe" ;;
*) player_fn="syncplay" ;;
esac
;;
Expand Down

0 comments on commit ff40321

Please sign in to comment.