improve html code
This commit is contained in:
parent
87679b3192
commit
62f1f71556
32
api/search
32
api/search
|
@ -2,8 +2,12 @@
|
||||||
|
|
||||||
echo "content-type: text/html"
|
echo "content-type: text/html"
|
||||||
echo
|
echo
|
||||||
echo '<meta charset="UTF-8"/>'
|
echo '<html>
|
||||||
echo '<meta name="robots" content="noindex" />'
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="robots" content="noindex" />
|
||||||
|
</head>
|
||||||
|
'
|
||||||
|
|
||||||
args=$(echo "$SP_TRACK" | awk -F? '{print $2}' | sed 's/%20/ /g')
|
args=$(echo "$SP_TRACK" | awk -F? '{print $2}' | sed 's/%20/ /g')
|
||||||
|
|
||||||
|
@ -14,22 +18,20 @@ result=$(../spotify-dl.sh "$args" | tee $log_file 2>&1 | grep "/var/www/spotify-
|
||||||
track=$(echo "$result" | awk -F '.mp3' '{print $1}')
|
track=$(echo "$result" | awk -F '.mp3' '{print $1}')
|
||||||
|
|
||||||
if [[ $track ]];then
|
if [[ $track ]];then
|
||||||
echo "<div class='container'>"
|
echo "<div class='container'>
|
||||||
echo "<br>"
|
<br>
|
||||||
echo "<center><h1>$track</center></h1>"
|
<center><h1>$track</center></h1>
|
||||||
echo "<br><br><br><br><br><br>"
|
<br><br><br><br><br><br>
|
||||||
echo "<center>"
|
<center>
|
||||||
echo "
|
|
||||||
<audio id=\"player\" controls>
|
<audio id=\"player\" controls>
|
||||||
<source src=\"https://spotify-dl.p2p.legal/play/$result\">
|
<source src=\"https://spotify-dl.p2p.legal/play/$result\">
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio>
|
</audio>
|
||||||
"
|
<br><br>
|
||||||
echo "<br><br>"
|
<h3><a href=\"https://spotify-dl.p2p.legal/dl/$result\">DOWNLOAD</a></h3>
|
||||||
echo "<h3><a href=\"https://spotify-dl.p2p.legal/dl/$result\">DOWNLOAD</a></h3>"
|
<br><br>
|
||||||
echo "<br><br>"
|
</center>
|
||||||
echo "</center>"
|
</div>"
|
||||||
echo "</div>"
|
|
||||||
else
|
else
|
||||||
echo "<center>No result found</center>"
|
echo "<center>No result found</center>"
|
||||||
# echo "<meta http-equiv = \"refresh\" content = \" 2 \"/>"
|
# echo "<meta http-equiv = \"refresh\" content = \" 2 \"/>"
|
||||||
|
@ -61,3 +63,5 @@ a {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
"
|
"
|
||||||
|
|
||||||
|
echo "</html>"
|
||||||
|
|
Loading…
Reference in New Issue