diff --git a/scripts/scan_torrents.sh b/scripts/scan_torrents.sh index 0d0ac1f..09a1ab8 100755 --- a/scripts/scan_torrents.sh +++ b/scripts/scan_torrents.sh @@ -46,7 +46,7 @@ for torrent_file in *.torrent; do leechers=$(jq -r '.peers' <<< $health_text) completed=$(jq -r '.completed' <<< $health_text) date_string=$(jq -r '.created' <<< $health_text) - if [ -z $date_string ]; then + if [ "$date_string" == "null" ]; then echo "Date was null, setting to now" created_date=$(date +%s) else