diff --git a/ani-cli b/ani-cli index 2360977..afa65a0 100755 --- a/ani-cli +++ b/ani-cli @@ -706,7 +706,7 @@ episode_selection() { read -r ep_choice_start ep_choice_end [[ -z "$ep_choice_end" ]] && ep_choice_end="$ep_choice_start" fi - if (((ep_choice_start <= 0 || ep_choice_start > LAST_EP_NUMBER) || ep_choice_end < ep_choice_start || ep_choice_end > LAST_EP_NUMBER)); then + if (((ep_choice_start < 0 || ep_choice_start > LAST_EP_NUMBER) || ep_choice_end < ep_choice_start || ep_choice_end > LAST_EP_NUMBER)); then die "Invalid episode/range entered: ep_start -> $ep_choice_start | ep_end -> $ep_choice_end" fi } diff --git a/sql/history.sql b/sql/history.sql index 7e54a79..74c6d65 100644 --- a/sql/history.sql +++ b/sql/history.sql @@ -24,7 +24,6 @@ CREATE TABLE IF NOT EXISTS watch_history ( episode_number integer NOT NULL, watch_date DATETIME NOT NULL, CHECK (LENGTH(anime_name) > 0), - CHECK (episode_number > 0), UNIQUE (anime_name, episode_number, watch_date) );