Added %isrc% and %upc%
authorRemixDev <deezloaderremix@gmail.com>
Wed, 12 Jun 2019 16:16:17 +0000 (18:16 +0200)
committerRemixDev <deezloaderremix@gmail.com>
Wed, 12 Jun 2019 16:16:17 +0000 (18:16 +0200)
app/app.js
app/public/index.html

index 6f82a604bdaebbb3e162f2e4a7c38f05fb8a0d59..f9be7943ed52027c9e40b64230f69612daf4199f 100644 (file)
@@ -1218,7 +1218,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}`)
+                                                               logger.error(`[${t.artist.name} - ${t.title}] ${err.stack ? err.stack : err}`)
                                                        }
                                                        io.sockets.emit("downloadProgress", {
                                                                queueId: downloading.queueId,
@@ -2195,6 +2195,7 @@ function settingsRegex(track, filename, playlist) {
                        filename = filename.replace(/%position%/g, '');
                }
                filename = filename.replace(/%disc%/g, fixName(track.discNumber));
+               filename = filename.replace(/%isrc%/g, fixName(track.ISRC ? track.ISRC : "Unknown"));
                filename = filename.replace(/%explicit%/g, fixName((track.explicit==="1" ? (filename.indexOf(/[^%]explicit/g)>-1 ? "" : "(Explicit)") : "")));
                filename = filename.replace(/%genre%/g, fixName(track.album.genre ? (Array.isArray(track.album.genre) ? track.album.genre[0] : track.album.genre) : "Unknown"));
                filename = filename.replace(/[/\\]/g, path.sep)
@@ -2235,6 +2236,7 @@ function settingsRegexAlbum(album, foldername) {
                        foldername = foldername.replace(/%type%/g, "")
                }
                foldername = foldername.replace(/%label%/g, fixName(album.label))
+               foldername = foldername.replace(/%upc%/g, fixName(album.barcode ? album.barcode : "Unknown"));
                foldername = foldername.replace(/%explicit%/g, fixName((album.explicit ? (foldername.indexOf(/[^%]explicit/g)>-1 ? "" : "(Explicit) ") : "")))
                foldername = foldername.replace(/%genre%/g, fixName(album.genres ? (Array.isArray(album.genres) ? album.genres[0] : album.genres) : "Unknown"))
                foldername = foldername.replace(/[/\\]/g, path.sep)
index d4faf324f786c2d51ce3b58524bd72ed23f89571..dcdda7ef4ae73b480ccb073c3e4f31c99723b54b 100644 (file)
@@ -84,7 +84,7 @@
                        <div class="input-field col s12">
                                <input autocomplete="off" type="text" id="modal_settings_input_trackNameTemplate"/>
                                <label for="modal_settings_input_trackNameTemplate">Tracknames template <i class="material-icons valignicon tiny tooltipped" data-position="right" data-delay="50"
-                                       data-tooltip="Supported variables are: %title%, %album%, %artist%, %year%, %date%, %label%, %number%, %disc%, %explicit% and %genre%">info_outline</i></label>
+                                       data-tooltip="Supported variables are: %title%, %album%, %artist%, %year%, %date%, %label%, %number%, %disc%, %isrc%, %explicit% and %genre%">info_outline</i></label>
                        </div>
                        <p class="col s12 path-example">path/to/file/example</p>
                </div>
                        <div class="input-field col s12 m6">
                                <input autocomplete="off" type="text" id="modal_settings_input_albumTrackNameTemplate"/>
                                <label for="modal_settings_input_albumTrackNameTemplate">Album tracknames template <i class="material-icons valignicon tiny tooltipped" data-position="right" data-delay="50"
-                                       data-tooltip="Supported variables are: %title%, %album%, %artist%, %year%, %date%, %label%, %number%, %disc%, %explicit% and %genre%">info_outline</i></label>
+                                       data-tooltip="Supported variables are: %title%, %album%, %artist%, %year%, %date%, %label%, %number%, %disc%, %isrc%, %explicit% and %genre%">info_outline</i></label>
                        </div>
                        <div class="input-field col s12 m6">
                                <input autocomplete="off" type="text" id="modal_settings_input_albumNameTemplate"/>
                                <label for="modal_settings_input_albumNameTemplate">Album names template <i class="material-icons valignicon tiny tooltipped" data-position="right" data-delay="50"
-                                       data-tooltip="Supported variables are: %album%, %artist%, %year%, %date%, %bitrate%, %type%, %label%, %explicit% and %genre%">info_outline</i></label>
+                                       data-tooltip="Supported variables are: %album%, %artist%, %year%, %date%, %bitrate%, %type%, %label%, %upc%, %explicit% and %genre%">info_outline</i></label>
                        </div>
                        <p class="col s12 path-example">path/to/file/example</p>
                </div>
                        <div class="input-field col s12">
                                <input autocomplete="off" type="text" id="modal_settings_input_playlistTrackNameTemplate"/>
                                <label for="modal_settings_input_playlistTrackNameTemplate">Playlist tracknames template <i class="material-icons valignicon tiny tooltipped" data-position="right" data-delay="50"
-                                       data-tooltip="Supported variables are: %title%, %album%, %artist%, %year%, %date%, %label%, %number%, %position%, %disc%, %explicit% and %genre%">info_outline</i></label>
+                                       data-tooltip="Supported variables are: %title%, %album%, %artist%, %year%, %date%, %label%, %number%, %position%, %disc%, %isrc%, %explicit% and %genre%">info_outline</i></label>
                        </div>
                        <p class="col s12 path-example">path/to/file/example</p>
                </div>