+ failover to yt-dlp
This commit is contained in:
parent
57892c86a1
commit
8efd5e6434
|
@ -69,6 +69,8 @@ window.addEventListener('DOMContentLoaded', (event) => {
|
||||||
|
|
||||||
selectStreams(videoFormat, audioFormat)
|
selectStreams(videoFormat, audioFormat)
|
||||||
}
|
}
|
||||||
|
video.preload="auto";
|
||||||
|
audio.preload="auto";
|
||||||
|
|
||||||
if (localStorage.getItem("volume") != null) {
|
if (localStorage.getItem("volume") != null) {
|
||||||
setVolume(localStorage.getItem("volume"));
|
setVolume(localStorage.getItem("volume"));
|
||||||
|
|
|
@ -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]}")
|
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
|
if [[ $video == '' ]]; then # okay who did this
|
||||||
random_hash=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1)
|
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 [[ $video == '' ]]; then # seriously WHO DID THIS
|
||||||
if [[ "${cfg[regionlock_proxy]}" == true ]]; then
|
if [[ "${cfg[regionlock_proxy]}" == true ]]; then
|
||||||
# retrying w/ proxy!
|
# retrying w/ proxy!
|
||||||
|
|
Loading…
Reference in a new issue