From 8efd5e6434bf69400000dca4a06c9db06189d10f Mon Sep 17 00:00:00 2001 From: Dominika Liberda Date: Sun, 24 Oct 2021 01:36:03 +0000 Subject: [PATCH] + failover to yt-dlp --- webroot/js/player.js | 2 ++ webroot/watch.shs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/webroot/js/player.js b/webroot/js/player.js index e32d4a3..0f7db5e 100644 --- a/webroot/js/player.js +++ b/webroot/js/player.js @@ -69,6 +69,8 @@ window.addEventListener('DOMContentLoaded', (event) => { selectStreams(videoFormat, audioFormat) } + video.preload="auto"; + audio.preload="auto"; if (localStorage.getItem("volume") != null) { setVolume(localStorage.getItem("volume")); diff --git a/webroot/watch.shs b/webroot/watch.shs index cefa792..a8b5c8e 100755 --- a/webroot/watch.shs +++ b/webroot/watch.shs @@ -47,7 +47,7 @@ if [[ "${get_data[v]}" ]]; then video=$(haruhi-dl --all-subs --ie-key Youtube --write-pages --cookies "${cfg[_cookies]}" -J "http://youtube.com/watch?v=${get_data[v]}") if [[ $video == '' ]]; then # okay who did this random_hash=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1) - video=$(haruhi-dl --all-subs --ie-key Youtube --write-pages --cookies ${cfg[_cookies]} -J "http://youtube.com/watch?v=${get_data[v]}" 2> output$random_hash.log) + video=$(yt-dlp --all-subs --write-pages --cookies ${cfg[_cookies]} -J "http://youtube.com/watch?v=${get_data[v]}" 2> output$random_hash.log) if [[ $video == '' ]]; then # seriously WHO DID THIS if [[ "${cfg[regionlock_proxy]}" == true ]]; then # retrying w/ proxy!