"
-
- jq -r '.contents.twoColumnWatchNextResults.secondaryResults.secondaryResults.results[] | .compactAutoplayRenderer.contents[0].compactVideoRenderer, .compactVideoRenderer | if .videoId != null then "
" else empty end' <<< "$vid_json"
+ strings[recommended]=$(jq -r '.contents.twoColumnWatchNextResults.secondaryResults.secondaryResults.results[] | .compactAutoplayRenderer.contents[0].compactVideoRenderer, .compactVideoRenderer | if .videoId != null then "
" else empty end' <<< "$vid_json")
#for i in $(grep -ohE "watch\?v\=[A-zaz0-9]{11}" <<< "$vid" | cut -c 9-19 | uniq); do
# echo "
";
#done
vid="$(curl -s "https://www.youtube.com/watch?v=${get_data[v]}" -c cookiejar_)" # broken comment support, we need this for now
-
- echo "
"
-
- jq -r '.contents.twoColumnWatchNextResults.secondaryResults.secondaryResults.results[] | .compactAutoplayRenderer.contents[0].compactVideoRenderer, .compactVideoRenderer | if .videoId != null then "
" else empty end' <<< "$vid_json"
+ strings[recommended]=$(jq -r '.contents.twoColumnWatchNextResults.secondaryResults.secondaryResults.results[] | .compactAutoplayRenderer.contents[0].compactVideoRenderer, .compactVideoRenderer | if .videoId != null then "
" else empty end' <<< "$vid_json")
#for i in $(grep -ohE "watch\?v\=[A-zaz0-9]{11}" <<< "$vid" | cut -c 9-19 | uniq); do
# echo "
";
@@ -104,12 +104,11 @@ if [[ "${get_data[v]}" ]]; then
done
for (( i=0; i<${#comment_nick[@]}; i++ )); do
- echo "
-
${comment_nick[$i]} | ${comment_published[$i]} | ${comment_likes[$i]} liked
-
${comment_text[$i]}
-
"
+ strings[comments_list]+="
${comment_nick[$i]} | ${comment_published[$i]} | ${comment_likes[$i]} liked
${comment_text[$i]}
"
done
+ strings[playlist]=""
+
if [[ "${get_data[playlist]}" ]]; then
playlist=$(haruhi-dl --cookies ${cfg[_cookies]} -j --flat-playlist "https://www.youtube.com/playlist?list=${get_data[playlist]}")
@@ -126,23 +125,14 @@ if [[ "${get_data[v]}" ]]; then
[[ "$next" == '' ]] && next='dQw4w9WgXcQ'
- echo ""
- echo "
Playlist
"
+ strings[playlist]+="
Playlist
"
for (( i=0; i<${#video_id[@]}; i++ )); do
- echo "
${video_title[$i]}"
+ strings[playlist]+="
${video_title[$i]}"
done
fi
- echo ""
+ render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/watch_flash.t"
else
source templates/head.sh
echo "pls add ?v param i'm still WiP"