Hide descr string if description empty

This commit is contained in:
localhost_frssoft 2022-04-06 14:34:07 +03:00
parent 2a31a63bbf
commit 3b590001a9
1 changed files with 14 additions and 5 deletions

View File

@ -107,9 +107,13 @@ peertube_menu_video()
video_url=$(echo $get_video | jj "$hls"files.#[resolution.id=$pref_video_quality].fileUrl)
torrent_url=$(echo $get_video | jj "$hls"files.#[resolution.id=$pref_video_quality].torrentUrl)
echo "Channel: $channel"
echo "Description video:\n$desc"
echo '_____'
menu_video_choice=$(echo "Play\nFull description\nBack\nMain menu" | fzy)
fulldescr=
if [ -n "$desc" ]; then
echo "Description video:\n$desc"
echo '_____'
fulldescr="\nFull description"
fi
menu_video_choice=$(echo "Play$fulldescr\nBack\nMain menu" | fzy)
case $menu_video_choice in
"Main menu") sub2_menu=0 && sub_menu=0 ;;
"Back") sub2_menu=0 ;;
@ -154,8 +158,13 @@ peertube_menu_stream()
echo "Status: $state"
#torrent_url=$(echo $get_video | jj streamingPlaylists.0.files.#[resolution.id=$pref_video_quality].torrentUrl)
echo "Channel: $channel"
echo "Description video:\n$desc"
menu_video_choice=$(echo "Play\nWait mode\nFull description\nBack\nMain menu" | fzy)
fulldescr=
if [ -n "$desc" ]; then
echo "Description stream:\n$desc"
echo '_____'
fulldescr="\nFull description"
fi
menu_video_choice=$(echo "Play\nWait mode$fulldescr\nBack\nMain menu" | fzy)
case $menu_video_choice in
"Main menu") sub2_menu=0 && sub_menu=0 ;;
"Back") sub2_menu=0 ;;