mirror of
http://gitea.phreedom.club/localhost_frssoft/peertube-cli
synced 2024-11-16 16:43:17 +00:00
fix pages
This commit is contained in:
parent
cf9c2ba397
commit
52d598b7e6
|
@ -50,11 +50,20 @@ peertube_menu_videos()
|
|||
{
|
||||
echo "Avalaible $(jj -i preload total) videos"
|
||||
sub_menu=1
|
||||
page=0
|
||||
while [ $sub_menu -eq 1 ]; do
|
||||
names=$(jj -i preload -l 'data.#.name')
|
||||
menu_videos_choice=$(echo "Main menu\n$names" | fzy)
|
||||
menu_videos_choice=$(echo "Main menu\n$names\nNext page" | fzy)
|
||||
case $menu_videos_choice in
|
||||
"Main menu") sub_menu=0 ;;
|
||||
"Next page")
|
||||
if [ "$1" = 'all' ]; then
|
||||
page=$(expr $page + 100)
|
||||
peertube_api_get_all_videos $page
|
||||
else
|
||||
page=$(expr $page + 100)
|
||||
peertube_api_get_local_videos $page
|
||||
fi ;;
|
||||
*)
|
||||
video_uuid=$(jj -i preload data.#[name="$menu_videos_choice"].uuid)
|
||||
peertube_menu_video $video_uuid ;
|
||||
|
@ -145,16 +154,12 @@ while true; do
|
|||
case "$choice" in
|
||||
|
||||
"$videosmenu")
|
||||
echo 'Enter page number (per 100 videos)'
|
||||
read page
|
||||
peertube_api_get_all_videos $page
|
||||
peertube_menu_videos ;;
|
||||
peertube_api_get_all_videos 0
|
||||
peertube_menu_videos 'all' ;;
|
||||
|
||||
"$videosmenulocal")
|
||||
echo 'Enter page number (per 100 videos)'
|
||||
read page
|
||||
peertube_api_get_local_videos $page
|
||||
peertube_menu_videos ;;
|
||||
peertube_api_get_local_videos 0
|
||||
peertube_menu_videos 'local' ;;
|
||||
|
||||
"$changepod")
|
||||
empty=0
|
||||
|
|
Loading…
Reference in a new issue