Backend for songs.zachdecook.com
Diffstat (limited to 'laravel/app/Song.php')
-rw-r--r--laravel/app/Song.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/laravel/app/Song.php b/laravel/app/Song.php
index 98f11c3..c723e3a 100644
--- a/laravel/app/Song.php
+++ b/laravel/app/Song.php
@@ -70,6 +70,8 @@ class Song extends Model
{
if (file_exists("public/music/{$this->id}.mp3")) {
return "/public/music/{$this->id}.mp3";
+ } elseif (file_exists("public/music/{$this->id}.m4a")) {
+ return "/public/music/{$this->id}.m4a";
}
}
public static function chordTransform($chord)