From bc128de8f9cbe4985c5de77e917fda50e4818073 Mon Sep 17 00:00:00 2001 From: sech1p Date: Thu, 18 Mar 2021 23:14:46 +0100 Subject: [PATCH] fix behavior of template string --- webroot/index.shs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webroot/index.shs b/webroot/index.shs index 0d1be18..6507e74 100755 --- a/webroot/index.shs +++ b/webroot/index.shs @@ -4,7 +4,11 @@ source ${cfg[namespace]}/templates/header.shs declare -A strings -strings[favourites]="No favorite videos found,
you can do it first! ^w^" +if [[ -s storage/faves ]]; then + strings[favourites]="" +else + strings[favourites]="No favorite videos found,
you can do it first! ^w^" +fi IFS=$'\n' for i in $(tac storage/faves); do