Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions ani-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version_number="5.0.2"
version_number="5.0.3"

# UI

Expand Down Expand Up @@ -161,7 +161,7 @@ anidb_search() {
[ "$curl_exe" = "curl" ] && die "Blocked by cloudflare. Try installing curl-impersonate"
die "Blocked by cloudflare."
fi
printf "%s" "$_page" | sed -nE 's|.*anime/([a-z0-9-]+-[0-9]+)".*alt="([^"]+)".*|\1\t\2|p' | sed -e "s|'|'|g" -e 's|"|"|g'
printf "%s" "$_page" | sed -nE 's|.*anime/([a-z0-9-]+-[0-9]+)".*alt="([^"]+)".*|\1\t\2|p' | sed -e "s|'|'|g" -e 's|"|"|g' -e "s|&|\&|g"
}

# extract mal_id and seasons metadata
Expand Down Expand Up @@ -351,6 +351,7 @@ play() {
_end=$(printf "%s" "$ep_no" | grep -Eo '(-1|[0-9]+(\.[0-9]+)?)$')
[ "$_start" = "-1" ] && ep_no=$(printf "%s" "$ep_list" | tail -n 1) && unset _start
[ -z "$_end" ] || [ "$_end" = "$_start" ] && unset _start _end
[ "$_start" = "0" ] && _start=$(printf "%s" "$ep_list" | head -n 1)
[ "$_end" = "-1" ] && _end=$(printf "%s" "$ep_list" | tail -n 1)
_line_count=$(printf "%s\n" "$ep_no" | wc -l | tr -d "[:space:]")
if [ "$_line_count" != 1 ] || [ -n "$_start" ]; then
Expand Down
2 changes: 1 addition & 1 deletion ani-cli.1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This tool scrapes the site anidb.
.SH OPTIONS
.TP
\fB\-e | --episode | -r | --range\fR \fI\,<episode>\/\fR
Specify the episode numbers to watch. If range is specified it should be quoted or separated by a non-numeric character (eg. -).
Specify the episode numbers to watch. If a range is specified, it should be quoted or separated by a non-numeric character (e.g. -). Use 0 for the first available episode and -1 for the last.
.TP
\fB\-c | --continue\fR
Continue watching anime from history.
Expand Down
Loading