diff --git a/templates/themes/default-v2/search.html b/templates/themes/default-v2/search.html index 7b8248e..c52e0bd 100644 --- a/templates/themes/default-v2/search.html +++ b/templates/themes/default-v2/search.html @@ -1,8 +1,15 @@ -{{start _results}} - - -
{{.title}}
- | {{.runtime}} seconds | {{.views}} views
-Uploaded by {{.channel}}
- -{{end _results}} +{{start ?query}} +

Results for "{{.query}}"

+
+ {{start _results}} +
+ +
+ {{.title}}

+ Uploaded by {{.channel}} · {{.runtime}} · {{.views}} views +
+ {{end _results}} +
+{{else ?query}} +

search for something will 'ya?

+{{end ?query}} \ No newline at end of file diff --git a/webroot/search.shs b/webroot/search.shs index 174402e..4cea146 100755 --- a/webroot/search.shs +++ b/webroot/search.shs @@ -12,6 +12,8 @@ fi #https://www.youtube.com/results?search_query=oooo if [[ "${get_data[search_query]}" ]]; then query="${get_data[search_query]}" + meow[query]=$(sed -s 's/+/ /g' <<< "${get_data[search_query]}") + meow[?query]=true query_nice=$(sed -s 's/+/ /g' <<< "${get_data[search_query]}") fi @@ -34,7 +36,7 @@ if [[ "${get_data[search_query]}" ]]; then for (( i=0; i<${#id[@]}; i++ )); do strings[id]="${id[$i]}" strings[title]="${title[$i]}" - strings[runtime]="${runtime[$i]}" + strings[runtime]="$(date -d "@${runtime[$i]}" "+%H:%M:%S")" strings[views]="${views[$i]}" strings[channel_id]="${channel_id[$i]}" strings[channel]="${channel[$i]}"