commit 816f5657fbf7ad3e92e334a165f8cfc985351d14
parent 788e9ffab9056ff734cec9d0109b37662c61c753
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 5 Apr 2025 17:47:29 +0200
feat: skip videos with zero views
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/index.php b/index.php
@@ -193,13 +193,16 @@
* has #short #shorts in the description
* description only contains #hashtags
* has no description at all
+ * Also filter out videos that come out in the future
+ * Main indicator is exactly zero views
*/
$vdesc = explode(" ", $video["desc"]);
if (
preg_match('/#short(s)*/', $video["title"]) > 0 ||
preg_match('/#short(s)*/', $video["desc"]) > 0 ||
preg_grep('/^(#|$)/', $vdesc) == $vdesc ||
- strlen($video["desc"]) == 0
+ strlen($video["desc"]) == 0 ||
+ $video["views"] == "0"
) {
continue;
}