Skip to content

Commit

Permalink
add bool for if stream thumbnail is available
Browse files Browse the repository at this point in the history
  • Loading branch information
brookgagnon committed Jun 28, 2024
1 parent e58fae0 commit 125c58b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/media_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 125c58b

Please sign in to comment.