From 0f5dfdc63ffc46459f126f44d5f57699ae9e7243 Mon Sep 17 00:00:00 2001 From: Dominika Liberda Date: Mon, 5 Dec 2022 11:13:59 +0000 Subject: [PATCH] channel: fix yt-dlp jq expansion --- webroot/channel.shs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webroot/channel.shs b/webroot/channel.shs index 004e789..eb2bba2 100644 --- a/webroot/channel.shs +++ b/webroot/channel.shs @@ -25,8 +25,8 @@ if [[ ${cfg[template]} == 'default' ]]; then fi IFS=$'\n' -video_title=($(jq -r '.entries[].title' <<< $data)) -video_id=($(jq -r '.entries[].id' <<< $data)) +video_title=($(jq -r 'if .entries[].channel_follower_count != null then .entries[].entries[] else .entries[] end | .title' <<< $data)) +video_id=($(jq -r 'if .entries[].channel_follower_count != null then .entries[].entries[] else .entries[] end | .id' <<< $data)) strings[subscribe]="$(html_encode "$title")"