+ failover to yt-dlp

merge-requests/6/head
Dominika Liberda 2021-10-24 01:36:03 +00:00
parent 57892c86a1
commit 8efd5e6434
2 changed files with 3 additions and 1 deletions

View File

@ -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"));

View File

@ -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!