1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-22 07:42:41 +00:00

Update MediaService, remove hls_manifest attribute for MastoAPI entities

This commit is contained in:
Daniel Supernault 2023-10-23 01:14:33 -06:00
parent f0ba2dfc69
commit 6cf4363c50
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -18,7 +18,7 @@ class MediaService
public static function get($statusId) public static function get($statusId)
{ {
return Cache::remember(self::CACHE_KEY.$statusId, 86400, function() use($statusId) { return Cache::remember(self::CACHE_KEY.$statusId, 21600, function() use($statusId) {
$media = Media::whereStatusId($statusId)->orderBy('order')->get(); $media = Media::whereStatusId($statusId)->orderBy('order')->get();
if(!$media) { if(!$media) {
return []; return [];
@ -46,7 +46,8 @@ class MediaService
$media['orientation'], $media['orientation'],
$media['filter_name'], $media['filter_name'],
$media['filter_class'], $media['filter_class'],
$media['mime'] $media['mime'],
$media['hls_manifest']
); );
$media['type'] = $mime ? strtolower($mime[0]) : 'unknown'; $media['type'] = $mime ? strtolower($mime[0]) : 'unknown';