From 235f1cea5063f8b49c9cf9af46a83912a2f1112f Mon Sep 17 00:00:00 2001
From: loicbersier <loic.bersier1@gmail.com>
Date: Sat, 7 Dec 2019 19:03:08 +0100
Subject: [PATCH] Show music files

---
 app/Controllers/Http/DownloadController.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/Controllers/Http/DownloadController.js b/app/Controllers/Http/DownloadController.js
index 5d1a580..f94b44b 100644
--- a/app/Controllers/Http/DownloadController.js
+++ b/app/Controllers/Http/DownloadController.js
@@ -28,7 +28,7 @@ class DownloadController {
     }
     // get the 5 most recent files
     file = file.sort(function(a, b) {
-      if ((a || b).endsWith('.mp4') && !(a || b).startsWith('HIDE')) {
+      if (((a || b).endsWith('.mp4') || (a || b).endsWith('.mp3') || (a || b).endsWith('.flac')) && !(a || b).startsWith('HIDE')) {
         let time1 = fs.statSync(`./public/uploads/${b}`).ctime;
         let time2 = fs.statSync(`./public/uploads/${a}`).ctime; 
         if (time1 < time2) return -1;