Hide descr string if description empty
This commit is contained in:
parent
2a31a63bbf
commit
3b590001a9
|
@ -107,9 +107,13 @@ peertube_menu_video()
|
||||||
video_url=$(echo $get_video | jj "$hls"files.#[resolution.id=$pref_video_quality].fileUrl)
|
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)
|
torrent_url=$(echo $get_video | jj "$hls"files.#[resolution.id=$pref_video_quality].torrentUrl)
|
||||||
echo "Channel: $channel"
|
echo "Channel: $channel"
|
||||||
echo "Description video:\n$desc"
|
fulldescr=
|
||||||
echo '_____'
|
if [ -n "$desc" ]; then
|
||||||
menu_video_choice=$(echo "Play\nFull description\nBack\nMain menu" | fzy)
|
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
|
case $menu_video_choice in
|
||||||
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
||||||
"Back") sub2_menu=0 ;;
|
"Back") sub2_menu=0 ;;
|
||||||
|
@ -154,8 +158,13 @@ peertube_menu_stream()
|
||||||
echo "Status: $state"
|
echo "Status: $state"
|
||||||
#torrent_url=$(echo $get_video | jj streamingPlaylists.0.files.#[resolution.id=$pref_video_quality].torrentUrl)
|
#torrent_url=$(echo $get_video | jj streamingPlaylists.0.files.#[resolution.id=$pref_video_quality].torrentUrl)
|
||||||
echo "Channel: $channel"
|
echo "Channel: $channel"
|
||||||
echo "Description video:\n$desc"
|
fulldescr=
|
||||||
menu_video_choice=$(echo "Play\nWait mode\nFull description\nBack\nMain menu" | fzy)
|
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
|
case $menu_video_choice in
|
||||||
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
"Main menu") sub2_menu=0 && sub_menu=0 ;;
|
||||||
"Back") sub2_menu=0 ;;
|
"Back") sub2_menu=0 ;;
|
||||||
|
|
Loading…
Reference in New Issue