From 0ec47e2d6667e911714d09594788aeec7b968c3d Mon Sep 17 00:00:00 2001 From: Luna Komorebi Date: Tue, 1 Jun 2021 00:33:41 +0200 Subject: [PATCH] + thousands separators for numbers --- webroot/watch.shs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webroot/watch.shs b/webroot/watch.shs index c277115..d27bca8 100755 --- a/webroot/watch.shs +++ b/webroot/watch.shs @@ -76,9 +76,9 @@ if [[ "${get_data[v]}" ]]; then fi strings[upload_date]=$(date -d "$(echo $video | jq -r '.upload_date' | sed -E 's/..../&-/;s/....-../&-/')" "+%d %B %Y") - strings[view_count]=$(echo $video | jq -r '.view_count') - like_count=$(echo $video | jq -r '.like_count') - dislike_count=$(echo $video | jq -r '.dislike_count') + strings[view_count]=$(echo $video | jq -r '.view_count' | xargs printf "%'d\n") + like_count=$(echo $video | jq -r '.like_count' | xargs printf "%'d\n") + dislike_count=$(echo $video | jq -r '.dislike_count' | xargs printf "%'d\n") if [[ ${cfg[template]} == 'default' ]]; then if [[ $like_count == 'null' && $dislike_count == 'null' ]]; then strings[like_dislike_count]="Likes are turned off"