diff --git a/scripts/video-upload-date.sh b/scripts/video-upload-date.sh index 6ace23d..7892e87 100644 --- a/scripts/video-upload-date.sh +++ b/scripts/video-upload-date.sh @@ -12,7 +12,12 @@ while read -r line; do file=$(echo "$line" | grep 'Destination:') [ -n "$file" ] && { file=$(echo "$file" | cut -d " " -f 3) - echo "$file" | sed -E "s|($file_prefix)([0-9]+)(\..+)?|\2|" + update=$(echo "$file" | sed -E "s|($file_prefix)(([0-9]+)\|(NA))(\..+)?|\2|") + if [ "$update" = "NA" ]; then + date +%Y%m%d + else + echo "$update" + fi break } done < "$fifo"