From 3bb6e99e5381a60939dcd94687e31eab9511d1dc Mon Sep 17 00:00:00 2001 From: FatKiwi Date: Wed, 30 Oct 2019 20:05:30 +0000 Subject: [PATCH] Fix #60 --- README.md | 2 +- SMLoadr.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b9ac1ed..97f86f3 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,6 @@ Guide on the [Wiki](https://git.fuwafuwa.moe/SMLoadrDev/SMLoadr/wiki/How-to-logi - The usage of this tool **may be illegal** in your country! Please inform yourself. - We do **not** give any guarantee at all and we are **not** responsible for damages of all kinds! -###This work is licensed under a [Creative Commons Attribution-NonCommercial 4.0 International License](http://creativecommons.org/licenses/by-nc/4.0/). +####This work is licensed under a [Creative Commons Attribution-NonCommercial 4.0 International License](http://creativecommons.org/licenses/by-nc/4.0/). --- > Made with :heart: & :beer: by SMLoadrDevs | Copyright © 2019 SMLoadrDevs. \ No newline at end of file diff --git a/SMLoadr.js b/SMLoadr.js index 070eca6..7a38be2 100644 --- a/SMLoadr.js +++ b/SMLoadr.js @@ -188,7 +188,7 @@ function initRequest() { // App info console.log(chalk.cyan('╔══════════════════════════════════════════════════════════════════╗')); - console.log(chalk.cyan('║') + chalk.bold.yellow(' SMLoadr v' + packageJson.version + ' ') + chalk.cyan('║')); + console.log(chalk.cyan('║') + chalk.bold.yellow(' SMLoadr v' + packageJson.version + ' ') + chalk.cyan('║')); console.log(chalk.cyan('╠══════════════════════════════════════════════════════════════════╣')); console.log(chalk.cyan('║') + ' DOWNLOADS: https://git.fuwafuwa.moe/SMLoadrDev/SMLoadr/releases' + chalk.cyan('║')); console.log(chalk.cyan('║') + ' MANUAL: https://git.fuwafuwa.moe/SMLoadrDev/SMLoadr ' + chalk.cyan('║')); @@ -1684,7 +1684,7 @@ function getTrackAlternative(trackInfos) { jar: true }).then((response) => { log.debug('Got alternative track for "track/' + trackInfos.SNG_ID + '"'); - if (response && 0 === Object.keys(response.error).length && response.results && response.results.data && 0 < response.results.data.length) { + if (response && 0 === Object.keys(response.error).length && response.results && response.results.data && 0 > response.results.data.length) { const foundTracks = response.results.data; let matchingTracks = []; if (foundTracks.length > 0) { @@ -2056,7 +2056,7 @@ function downloadTrack(trackInfos, trackQualityId, saveFilePath, numberRetry = 0 let maxNumberRetry = 1; if ((trackInfos.RIGHTS && 0 !== Object.keys(trackInfos.RIGHTS).length) || (trackInfos.AVAILABLE_COUNTRIES && trackInfos.AVAILABLE_COUNTRIES.STREAM_ADS && 0 < trackInfos.AVAILABLE_COUNTRIES.STREAM_ADS.length)) { - maxNumberRetry = 20; + maxNumberRetry = 2; } if (maxNumberRetry >= numberRetry) {