Skip to content

Commit

Permalink
fix: use regex on file basename
Browse files Browse the repository at this point in the history
  • Loading branch information
davidecavestro committed Jun 5, 2024
1 parent 36e944d commit f2b754e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions save.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function do_video () {

local creation_time=$(ffprobe -v quiet -print_format json -show_entries format_tags=creation_time "$FILE" | jq -r '.format.tags.creation_time')

local filename=$(basename $FILE)
# If creation_time is not available, try getting it from filename
if [[ "$creation_time" == "null" || -z "$creation_time" ]]; then
# Use regex to match the encoded timestamp in the filename
Expand Down

0 comments on commit f2b754e

Please sign in to comment.