diff --git a/app/Album.php b/app/Album.php index d71cc1fb..3a2b627a 100644 --- a/app/Album.php +++ b/app/Album.php @@ -99,7 +99,8 @@ class Album extends Model 'name' => $name, 'extension' => $format['extension'], 'url' => $album->getDownloadUrl($name), - 'size' => Helpers::formatBytes($album->getFilesize($name)) + 'size' => Helpers::formatBytes($album->getFilesize($name)), + 'isCacheable' => (in_array($name, array_keys(Track::$CacheableFormats)) ? true : false) ]; } diff --git a/app/Track.php b/app/Track.php index 7e06db09..51ff35d8 100644 --- a/app/Track.php +++ b/app/Track.php @@ -235,7 +235,8 @@ class Track extends Model 'name' => $trackFile->format, 'extension' => $trackFile->extension, 'url' => $trackFile->url, - 'size' => $trackFile->size + 'size' => $trackFile->size, + 'isCacheable' => $trackFile->is_cacheable ]; }