Skip to content

Commit

Permalink
fix: account for point episodes having multiple digits (e.g. 124.125) (
Browse files Browse the repository at this point in the history
  • Loading branch information
71zenith authored Mar 16, 2023
1 parent 1a9b363 commit ec28d2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ani-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version_number="4.2.0"
version_number="4.2.1"

# UI

Expand Down Expand Up @@ -240,8 +240,8 @@ play_episode() {
}

play() {
start=$(printf "%s" "$ep_no" | grep -Eo '^(-1|[0-9]+(\.[0-9])?)')
end=$(printf "%s" "$ep_no" | grep -Eo '(-1|[0-9]+(\.[0-9])?)$')
start=$(printf "%s" "$ep_no" | grep -Eo '^(-1|[0-9]+(\.[0-9]+)?)')
end=$(printf "%s" "$ep_no" | grep -Eo '(-1|[0-9]+(\.[0-9]+)?)$')
[ "$start" = "-1" ] && ep_no=$(printf "%s" "$ep_list" | tail -n1) && unset start
[ -z "$end" ] || [ "$end" = "$start" ] && unset start end
[ "$end" = "-1" ] && end=$(printf "%s" "$ep_list" | tail -n1)
Expand Down

0 comments on commit ec28d2a

Please sign in to comment.