Introduction
Introduction Statistics Contact Development Disclaimer Help
youtube/cgi: don't show views if there are no view stats yet - frontends - fron…
Log
Files
Refs
README
LICENSE
---
commit 6e9b44889cda7e7eafa338dc616286773b1b75ca
parent be809a17f1b8dc119d6bb2b1334fbb8c4a6fb283
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 9 Jun 2023 00:39:39 +0200
youtube/cgi: don't show views if there are no view stats yet
This happens for livestreams etc.
Diffstat:
M youtube/cgi.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/youtube/cgi.c b/youtube/cgi.c
@@ -281,9 +281,12 @@ render_search(struct search_response *r)
OUT("</span><br/>\n");
}
OUT(" <span class=\"stats\">");
- printnumsep(v->viewcount);
+ if (v->viewcount[0]) {
+ printnumsep(v->viewcount);
+ OUT(" views");
+ }
OUT(
- " views</span><br/>\n"
+ "</span><br/>\n"
" </td>\n"
" <td align=\"right\" class=\"a-r\">\n"
" <span class=\"duration\">");
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.