Fixed #152
authorRemixDev <deezloaderremix@gmail.com>
Thu, 30 Jan 2020 19:49:33 +0000 (20:49 +0100)
committerRemixDev <deezloaderremix@gmail.com>
Thu, 30 Jan 2020 19:49:33 +0000 (20:49 +0100)
app/app.js

index 75d2336a7238f342a7fba98c3b37bd1b054cf856..7e577f7b8e1e8f92c4fd2abd92be5d24de985455 100644 (file)
@@ -3087,10 +3087,12 @@ function getID3v1(track, settings){
        }
        if (settings.tags.trackNumber){
                if (track.trackNumber <= 65535)
-                       if (track.trackNumber > 255)
-                               tagBuffer.writeUInt8(parseInt(track.trackNumber),125)
-                       else
+                       if (track.trackNumber > 255){
+                               tagBuffer.writeUInt8(parseInt(track.trackNumber >> 8),125)
+                               tagBuffer.writeUInt8(parseInt(track.trackNumber & 255),126)
+                       }else{
                                tagBuffer.writeUInt8(parseInt(track.trackNumber),126)
+                       }
        }
        if (settings.tags.genre){
                let selectedGenre = Array.isArray(track.album.genre) ? track.album.genre[0] : track.album.genre;