Fixed #232
authorRemixDev <deezloaderremix@gmail.com>
Tue, 12 Mar 2019 21:13:04 +0000 (22:13 +0100)
committerRemixDev <deezloaderremix@gmail.com>
Tue, 12 Mar 2019 21:13:04 +0000 (22:13 +0100)
app/app.js

index ce01c5fdc4b229c05385d8954c30914948bb3da5..f9d40b79b9fdccc15b1d1b540f013a94b9745381 100644 (file)
@@ -1239,10 +1239,11 @@ io.sockets.on('connection', function (s) {
                                        track.genre = uniqueArray(genreArray, false)
                                }
                        }else{
-                               // Missing barcode, genre, recordType
+                               // Missing barcode, genre
                                track.album = ajson
                                track.date = track.album.date
                                track.trackTotal = track.album.trackTotal
+                               track.recordType = swichReleaseType(track.recordType)
                                // TODO: Make a loop for each artist
                        }
 
@@ -2034,7 +2035,7 @@ function splitNumber(str,total){
 }
 
 function swichReleaseType(id){
-       switch (id) {
+       switch (id.toString()) {
                case "0":
                        return "Album";
                case "1":
@@ -2042,7 +2043,7 @@ function swichReleaseType(id){
                case "3":
                        return "EP";
                default:
-                       return id;
+                       return "Album";
        }
 }