diff options
| author | Fuwn <[email protected]> | 2023-05-30 01:09:01 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-05-30 01:09:01 -0700 |
| commit | d080f8e84702935e233ced09dba31b27a758e914 (patch) | |
| tree | 10a8dcf7e6b0155d1cb79fc14b120ab52856c678 /src | |
| parent | docs(readme): update aur instructions (diff) | |
| download | nectar-d080f8e84702935e233ced09dba31b27a758e914.tar.xz nectar-d080f8e84702935e233ced09dba31b27a758e914.zip | |
fix(chapter_selection): start chapter index at one
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/chapter_selection.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/chapter_selection.sh b/src/lib/chapter_selection.sh index c3534a5..1ab75d1 100644 --- a/src/lib/chapter_selection.sh +++ b/src/lib/chapter_selection.sh @@ -1,7 +1,7 @@ chapter_selection() { # Novel page HTML novel_page="$(gum spin --spinner line --show-output -- \ - curl --silent --get --data-urlencode "k=${args[title]}" "${1}")" + curl --silent --get --data-urlencode "k=${args[title]}" "${1}")" # Chapter data IFS=$'\n' read -r -d '\n' -a chapter_locations <<<"$(echo "${novel_page}" | @@ -14,7 +14,7 @@ chapter_selection() { # Fix output format for Gum for ((i = 0; i < "${#chapter_locations[@]}"; i++)); do - chapters+="$(printf "\nChapter ${i}:%s" "${chapter_names[${i}]}")" + chapters+="$(printf "\nChapter $((i + 1)):%s" "${chapter_names[${i}]}")" done # Remove leading new-line |