From 125c58bc6ffd9dd7091e56a9b76234ec76256a37 Mon Sep 17 00:00:00 2001 From: Brook Gagnon Date: Fri, 28 Jun 2024 19:06:39 +0000 Subject: [PATCH] add bool for if stream thumbnail is available --- models/media_model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/media_model.php b/models/media_model.php index 0418f078..d34f90a4 100644 --- a/models/media_model.php +++ b/models/media_model.php @@ -759,6 +759,7 @@ public function search($args = []) $items = $this->db->get('media'); foreach ($items as &$item) { $item['thumbnail'] = $this->models->media('media_thumbnail_exists', ['media' => $item]); + $item['stream_thumbnail'] = file_exists(OB_CACHE . '/streams/' . $item['file_location'][0] . '/' . $item['file_location'][1] . '/' . $item['id'] . '/thumb.jpg'); } return array($items,$total_media_found); @@ -796,6 +797,7 @@ public function search($args = []) $items = $this->db->get('media'); foreach ($items as &$item) { $item['thumbnail'] = $this->models->media('media_thumbnail_exists', ['media' => $item]); + $item['stream_thumbnail'] = file_exists(OB_CACHE . '/streams/' . $item['file_location'][0] . '/' . $item['file_location'][1] . '/' . $item['id'] . '/thumb.jpg'); } return array($items,$total_media_found);