Fixed #209
authorRemixDev <deezloaderremix@gmail.com>
Fri, 8 Mar 2019 22:02:14 +0000 (23:02 +0100)
committerRemixDev <deezloaderremix@gmail.com>
Fri, 8 Mar 2019 22:02:14 +0000 (23:02 +0100)
app/app.js
app/public/js/frontend.js

index 118a246f8f5a6fadc2e489a7ef30df87975d918a..2a6927a35a3880216a425dfe518647c62bb8cdef 100644 (file)
@@ -759,6 +759,7 @@ io.sockets.on('connection', function (s) {
                                                await downloadTrackObject(downloading.obj, downloading.queueId, downloading.settings)
                                                downloading.downloaded++
                                        }catch(err){
+                                               logger.error(`[${downloading.obj.artist.name} - ${downloading.obj.title}] ${err}`)
                                                downloading.failed++
                                        }
                                        s.emit("updateQueue", {
@@ -834,6 +835,7 @@ io.sockets.on('connection', function (s) {
                                                        }catch(err){
                                                                downloading.failed++
                                                                downloading.errorLog += `${t.id} | ${t.artist.name} - ${t.title} | ${err}\r\n`
+                                                               logger.error(`[${t.artist.name} - ${t.title}] ${err}`)
                                                        }
                                                        s.emit("downloadProgress", {
                                                                queueId: downloading.queueId,
@@ -909,9 +911,9 @@ io.sockets.on('connection', function (s) {
                                                                downloading.playlistArr[t.playlistData[0]] = t.playlistData[1].split(filePath)[1]
                                                                if (t.searched) downloading.searchedLog += `${t.artist.name} - ${t.title}\r\n`
                                                        }catch(err){
-                                                               logger.debug(err.stack ? err.stack : err)
                                                                downloading.failed++
                                                                downloading.errorLog += `${t.id} | ${t.artist.name} - ${t.title} | ${err}\r\n`
+                                                               logger.error(`[${t.artist.name} - ${t.title}] ${err}`)
                                                        }
                                                        s.emit("downloadProgress", {
                                                                queueId: downloading.queueId,
@@ -1034,6 +1036,7 @@ io.sockets.on('connection', function (s) {
                                                        }catch(err){
                                                                downloading.failed++
                                                                downloading.errorLog += `${t.id} | ${t.artist.name} - ${t.title} | ${err}\r\n`
+                                                               logger.error(`[${t.artist.name} - ${t.title}] ${err}`)
                                                        }
                                                        s.emit("downloadProgress", {
                                                                queueId: downloading.queueId,
@@ -1229,8 +1232,12 @@ io.sockets.on('connection', function (s) {
                                // Missing barcode, genre, recordType
                                track.album = ajson
                                track.date = track.album.date
+                               track.trackTotal = track.album.trackTotal
                                // TODO: Make a loop for each artist
+                       }
 
+                       if (!track.date.slicedYear){
+                               track.date.slicedYear = settings.dateFormatYear == "2" ? track.date.year.slice(2, 4) : track.date.year.slice(0, 4)
                        }
 
                        // Acquiring bpm (only if necessary)
index f2c0f8a41af40ea37e7f8ccc9a9b9a211c2f3c59..bdab48899e85f16a50edbb9a6660d844f0662788 100644 (file)
@@ -703,7 +703,6 @@ socket.on("getTrackList", function (data) {
                        var tableBody = $('#modal_trackList_table_trackList_tbody_trackList')
                }
                $(tableBody).html('')
-               console.log(data)
                //############################################
                if (data.reqType == 'artist') {
                        trackListModalApp.title = data.response.name
@@ -1210,7 +1209,6 @@ function generateDownloadLink(url) {
     e.preventDefault();
                $(modalQuality).data("url", url)
                $(modalQuality).css('display', 'block')
-               console.log("Opening")
                $(modalQuality).addClass('animated fadeIn')
     return false;
        }).on('click', function(e){