Merge pull request #154 from hannesbraun/season-choosing-offset

Fix offset in interactive season choosing
This commit is contained in:
ByteDream 2023-02-21 16:29:03 +01:00 committed by GitHub
commit 758db86f2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -646,7 +646,7 @@ pub(crate) fn interactive_season_choosing(seasons: Vec<Media<Season>>) -> Vec<Me
let mut nums = vec![];
for capture in input_regex.captures_iter(&user_input) {
if let Some(single) = capture.name("single") {
nums.push(single.as_str().parse().unwrap());
nums.push(single.as_str().parse::<usize>().unwrap() - 1);
} else {
let range_from = capture.name("range_from");
let range_to = capture.name("range_to");