Skip to content

Commit

Permalink
Update striptracks.sh
Browse files Browse the repository at this point in the history
- Bug fix
  • Loading branch information
TheCaptain989 committed Sep 1, 2023
1 parent 6e2c147 commit 1a25340
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions root/usr/local/bin/striptracks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ function get_rename {
function rename_video {
local url="$striptracks_api_url/command"
local data="{\"name\":\"RenameFiles\",\"${striptracks_video_type}Id\":$striptracks_rescan_id,\"files\":[$striptracks_videofile_id]}"
echo "Info|Renaming new video file per ${striptracks_type^}'s rules to \"${striptracks_renamedvideo##*/}\"" | log
echo "Info|Renaming new video file per ${striptracks_type^}'s rules to \"$(basename "$striptracks_renamedvideo")\"" | log
[ $striptracks_debug -ge 1 ] && echo "Debug|Renaming \"$striptracks_newvideo\". Calling ${striptracks_type^} API using POST and URL '$url' with data $data" | log
unset striptracks_result
striptracks_result=$(curl -s --fail-with-body -H "X-Api-Key: $striptracks_apikey" \
Expand Down Expand Up @@ -1292,7 +1292,7 @@ elif [ -n "$striptracks_api_url" ]; then
if [ -n "$striptracks_renamedvideo" ]; then
rename_video
striptracks_return=$?; [ $striptracks_return -ne 0 ] && {
striptracks_message="Error|[$striptracks_return] ${striptracks_type^} error when renaming \"${striptracks_newvideo##*/}\" to \"${striptracks_renamedvideo##*/}\""
striptracks_message="Error|[$striptracks_return] ${striptracks_type^} error when renaming \"$(basename "$striptracks_newvideo")\" to \"$(basename "$striptracks_renamedvideo")\""
echo "$striptracks_message" | log
echo "$striptracks_message" >&2
striptracks_exitstatus=17
Expand Down

0 comments on commit 1a25340

Please sign in to comment.