adding old changes

18l-fix
Dominika Liberda 2020-12-29 03:04:44 +01:00
parent 7f199e8b8f
commit 46072b54bc
4 changed files with 8 additions and 8 deletions

View File

@ -4,9 +4,9 @@ meta[title]=$title
source templates/head.sh
if [[ ${get_data[id]} ]]; then
data=$(haruhi-dl -j --flat-playlist https://www.youtube.com/channel/${get_data[id]})
data=$(haruhi-dl $([[ ${cfg[_cookies]} != "" ]] && echo -n -- "-c ${cfg[_cookies]}") -j --flat-playlist https://www.youtube.com/channel/${get_data[id]})
elif [[ ${get_data[name]} ]]; then
data=$(haruhi-dl -j --flat-playlist https://www.youtube.com/user/${get_data[name]})
data=$(haruhi-dl $([[ ${cfg[_cookies]} != "" ]] && echo -n -- "-c ${cfg[_cookies]}") -j --flat-playlist https://www.youtube.com/user/${get_data[name]})
else
echo "Please specify either id or name"
return

View File

@ -1,7 +1,7 @@
#!/bin/bash
if session_verify ${cookies[sh_session]} && [[ ${get_data[v]} != '' ]]; then
title=$(haruhi-dl -e "https://youtube.com/watch?v=${get_data[v]}")
title=$(haruhi-dl $([[ ${cfg[_cookies]} != "" ]] && echo -n -- "-c ${cfg[_cookies]}") -e "https://youtube.com/watch?v=${get_data[v]}")
if [[ $(cat storage/faves | grep -F "$title" | grep "$(echo ${cookies[username]} | sed -E "s/\r//")") == '' ]]; then
echo "$(session_get_username ${cookies[sh_session]}):${get_data[v]}:$title" >> storage/faves
fi

View File

@ -4,9 +4,9 @@ meta[title]=$title
source templates/head.sh
if [[ ${get_data[id]} ]]; then
data=$(haruhi-dl -j --flat-playlist https://www.youtube.com/playlist?list=${get_data[id]})
data=$(haruhi-dl $([[ ${cfg[_cookies]} != "" ]] && echo -n -- "-c ${cfg[_cookies]}") -j --flat-playlist https://www.youtube.com/playlist?list=${get_data[id]})
else
echo "Please specify either `id`"
echo "Please specify id"
return
fi

View File

@ -14,9 +14,9 @@ if [[ ${get_data[v]} ]]; then
meta[title]=$title
source templates/head.sh
else
video=$(haruhi-dl -J "http://youtube.com/watch?v=${get_data[v]}")
video=$(haruhi-dl $([[ ${cfg[_cookies]} != "" ]] && echo -n -- "-c ${cfg[_cookies]}") -J "http://youtube.com/watch?v=${get_data[v]}")
if [[ $video == '' ]]; then
video=$(haruhi-dl -J "http://youtube.com/watch?v=${get_data[v]}")
video=$(haruhi-dl $([[ ${cfg[_cookies]} != "" ]] && echo -n -- "-c ${cfg[_cookies]}") -J "http://youtube.com/watch?v=${get_data[v]}")
if [[ $video == '' ]]; then
return
fi
@ -74,7 +74,7 @@ if [[ ${get_data[v]} ]]; then
</div>";
if [[ ${get_data[playlist]} ]]; then
playlist=$(haruhi-dl -j --flat-playlist https://www.youtube.com/playlist?list=${get_data[playlist]})
playlist=$(haruhi-dl $([[ ${cfg[_cookies]} != "" ]] && echo -n -- "-c ${cfg[_cookies]}") -j --flat-playlist https://www.youtube.com/playlist?list=${get_data[playlist]})
IFS=$'\n'
video_title=($(jq -r '.title' <<< $playlist))