* unifying URL schema fixes
This commit is contained in:
parent
4761a3f747
commit
8a70900512
|
@ -8,7 +8,7 @@ echo "<a href='/'><img src='/img/bashtube.png'></a><br>"
|
||||||
# we'll need to figure out conditional templates first tho
|
# we'll need to figure out conditional templates first tho
|
||||||
|
|
||||||
if ! session_verify "${cookies[sh_session]}"; then
|
if ! session_verify "${cookies[sh_session]}"; then
|
||||||
echo "<a href='/login.shs'</a>Log in</a> | <a href='/register.shs'>Register</a>"
|
echo "<a href='/login.shs'>Log in</a> | <a href='/register.shs'>Register</a>"
|
||||||
else
|
else
|
||||||
echo "Logged in as ${cookies[username]} | <a href='/logout.shs'>Log out</a> | <a href='/feed.shs'>Your feed</a> | <a href='/fav.shs'>Your favourites</a>"
|
echo "Logged in as ${cookies[username]} | <a href='/logout.shs'>Log out</a> | <a href='/feed.shs'>Your feed</a> | <a href='/fav.shs'>Your favourites</a>"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<form action='/search.shs'>
|
<form action='/results'>
|
||||||
<input name='search_query' type='text' value='{{.query_nice}}'>
|
<input name='search_query' type='text' value='{{.query_nice}}'>
|
||||||
<input type='submit' value='Search'>
|
<input type='submit' value='Search'>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -41,7 +41,7 @@ if [[ "${get_data[v]}" ]]; then
|
||||||
}
|
}
|
||||||
}]'
|
}]'
|
||||||
if [[ "${r[host]}" == "${cfg[flash_host]}" ]]; then
|
if [[ "${r[host]}" == "${cfg[flash_host]}" ]]; then
|
||||||
url='//f.sakamoto.pl/videoplayback_.flv'
|
url='http://f.sakamoto.pl/videoplayback_.flv'
|
||||||
fi
|
fi
|
||||||
if [[ ${cfg[template]} == 'default' ]]; then
|
if [[ ${cfg[template]} == 'default' ]]; then
|
||||||
meta[title]="${strings[title]}"
|
meta[title]="${strings[title]}"
|
||||||
|
@ -86,10 +86,12 @@ if [[ "${get_data[v]}" ]]; then
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
urls=($(jq -r '.formats[] | select(.format_id == "22" or .format_id == "18").url' <<< "$video"))
|
urls=($(jq -r '.formats[] | select(.format_id == "22" or .format_id == "18").url' <<< "$video"))
|
||||||
unset IFS
|
unset IFS
|
||||||
if [[ ${urls[1]} != '' ]]; then
|
if [[ "$url" == '' ]]; then
|
||||||
url=${urls[1]}
|
if [[ ${urls[1]} != '' ]]; then
|
||||||
else
|
url=${urls[1]}
|
||||||
url=${urls[0]}
|
else
|
||||||
|
url=${urls[0]}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
strings[player]=$(source "${cfg[namespace]}/webroot/player_flash.shs")
|
strings[player]=$(source "${cfg[namespace]}/webroot/player_flash.shs")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue