From eefc247b649ea9e9b4fe3d0515e4481f8f7fe539 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Sat, 2 Apr 2022 03:26:36 +0300 Subject: [PATCH] page track counter fix --- funkwhale-cli.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/funkwhale-cli.sh b/funkwhale-cli.sh index 10e2204..a1b7fc2 100755 --- a/funkwhale-cli.sh +++ b/funkwhale-cli.sh @@ -63,8 +63,8 @@ load_tracks_to_playlist() echo "https://$instance$i\n" >> playlist.m3u8 done count_tracks_results=$(jj -i preload 'results.#') - if [ -z $count_tracks_results ]; then - echo 'Error: Page empty or 500 Internal Server Error' + if [ -z $count_tracks_results ] || [ $count_tracks_results -eq 0 ]; then + echo 'Error: Page empty or connection error' else echo "Loaded $count_tracks_results tracks" fi