diff --git a/.config/bash/module/Name.sh b/.config/bash/module/Name.sh index 3b6cfa8..3372fef 100644 --- a/.config/bash/module/Name.sh +++ b/.config/bash/module/Name.sh @@ -135,17 +135,17 @@ function name_hash_check() { # Rename files for Jellyfin series, i.e. `Episode S01E01.mkv` # All files by default. -# Usage: name_series [FILES] +# Usage: name_series [FILES] function name_series() { local IFS=$'\n' - local season=${1} + local season="$(realpath .)"; season="${season##*\ }" local episode=0 - local targets=(${@:2}) + local targets=(${@}) [[ "${targets}" = "" ]] && targets=($(_ls_file)) # Error when no season number specified. if [[ "${season}" = "" ]]; then - echo "usage: name_series [FILES]" + _error "Could not determine season number." return 2 fi @@ -178,7 +178,7 @@ function name_manga() { # Error when no season number specified. if [[ "${season}" = "" ]]; then - echo "usage: name_manga [FILES]" + help name_manga return 2 fi