Added #297 (Bitrate Variable)
authorRemixDev <deezloaderremix@gmail.com>
Tue, 4 Jun 2019 11:39:44 +0000 (13:39 +0200)
committerRemixDev <deezloaderremix@gmail.com>
Tue, 4 Jun 2019 11:39:44 +0000 (13:39 +0200)
app/app.js

index 45658148afe0063e03900e58259516f2ce5c364f..3ef3655a66113d97109f99a1afaaed50f5829830 100644 (file)
@@ -2194,6 +2194,19 @@ function settingsRegexAlbum(album, foldername) {
                foldername = foldername.replace(/%artist%/g, fixName(album.artist.name))
                foldername = foldername.replace(/%year%/g, fixName(album.year))
                foldername = foldername.replace(/%date%/g, fixName(album.date))
+               switch(album.bitrate){
+                       case 9:
+                               foldername = foldername.replace(/%bitrate%/g, "FLAC")
+                       break
+                       case 3:
+                               foldername = foldername.replace(/%bitrate%/g, "320")
+                       break
+                       case 1:
+                               foldername = foldername.replace(/%bitrate%/g, "128")
+                       break
+                       default:
+                               foldername = foldername.replace(/%bitrate%/g, "128")
+               }
                if (album.recordType){
                        foldername = foldername.replace(/%type%/g, fixName(album.recordType[0].toUpperCase() + album.recordType.substring(1)))
                }else{