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
|
||||
echo '<meta charset="UTF-8"/>'
|
||||
echo '<meta name="robots" content="noindex" />'
|
||||
echo '<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="robots" content="noindex" />
|
||||
</head>
|
||||
'
|
||||
|
||||
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}')
|
||||
|
||||
if [[ $track ]];then
|
||||
echo "<div class='container'>"
|
||||
echo "<br>"
|
||||
echo "<center><h1>$track</center></h1>"
|
||||
echo "<br><br><br><br><br><br>"
|
||||
echo "<center>"
|
||||
echo "
|
||||
echo "<div class='container'>
|
||||
<br>
|
||||
<center><h1>$track</center></h1>
|
||||
<br><br><br><br><br><br>
|
||||
<center>
|
||||
<audio id=\"player\" controls>
|
||||
<source src=\"https://spotify-dl.p2p.legal/play/$result\">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
"
|
||||
echo "<br><br>"
|
||||
echo "<h3><a href=\"https://spotify-dl.p2p.legal/dl/$result\">DOWNLOAD</a></h3>"
|
||||
echo "<br><br>"
|
||||
echo "</center>"
|
||||
echo "</div>"
|
||||
<br><br>
|
||||
<h3><a href=\"https://spotify-dl.p2p.legal/dl/$result\">DOWNLOAD</a></h3>
|
||||
<br><br>
|
||||
</center>
|
||||
</div>"
|
||||
else
|
||||
echo "<center>No result found</center>"
|
||||
# echo "<meta http-equiv = \"refresh\" content = \" 2 \"/>"
|
||||
|
@ -61,3 +63,5 @@ a {
|
|||
}
|
||||
</style>
|
||||
"
|
||||
|
||||
echo "</html>"
|
||||
|
|
Loading…
Reference in New Issue