diff --git a/peertube-cli.sh b/peertube-cli.sh index 96b1314..1fadd3c 100755 --- a/peertube-cli.sh +++ b/peertube-cli.sh @@ -143,8 +143,8 @@ peertube_menu_video() else hls='streamingPlaylists.0.' fi - 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) + 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" fulldescr= if [ -n "$desc" ]; then @@ -160,9 +160,9 @@ peertube_menu_video() if [ -z "$video_url" ]; then echo "Resolution $pref_video_quality"'p not avalaible' echo 'Please choice:' - resolution=$(echo "$get_video" | jj -l "$hls"files.#.resolution.label | fzy) - video_url=$(echo "$get_video" | jj "$hls"files.#[resolution.label="$resolution"].fileUrl) - torrent_url=$(echo "$get_video" | jj "$hls"files.#[resolution.label="$resolution"].torrentUrl) + resolution=$(echo "$get_video" | jj -l "$hls"files.\#.resolution.label | fzy) + video_url=$(echo "$get_video" | jj "$hls"files.\#[resolution.label="$resolution"].fileUrl) + torrent_url=$(echo "$get_video" | jj "$hls"files.\#[resolution.label="$resolution"].torrentUrl) fi if [ "$torrent_enabled" = 'true' ]; then @@ -179,8 +179,8 @@ peertube_menu_video() "Share") echo "Link: https://$instance/w/$1" echo "Direct links:" - echo "$(echo "$get_video" | jj -l "$hls"files.#.resolution.label)" - echo "$(echo "$get_video" | jj -l "$hls"files.#.fileUrl)" ;; + echo "$(echo "$get_video" | jj -l "$hls"files.\#.resolution.label)" + echo "$(echo "$get_video" | jj -l "$hls"files.\#.fileUrl)" ;; esac done }