Temporary workaround
This commit is contained in:
parent
63aaa76526
commit
797101dcbe
20
SMLoadr.js
20
SMLoadr.js
|
@ -122,7 +122,7 @@ let requestWithCache;
|
||||||
|
|
||||||
function initRequest() {
|
function initRequest() {
|
||||||
httpHeaders = {
|
httpHeaders = {
|
||||||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36',
|
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36',
|
||||||
'cache-control': 'max-age=0',
|
'cache-control': 'max-age=0',
|
||||||
'accept-language': 'en-US,en;q=0.9,en-US;q=0.8,en;q=0.7',
|
'accept-language': 'en-US,en;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||||
'accept-charset': 'utf-8,ISO-8859-1;q=0.8,*;q=0.7',
|
'accept-charset': 'utf-8,ISO-8859-1;q=0.8,*;q=0.7',
|
||||||
|
@ -1866,9 +1866,9 @@ function getValidTrackQuality(trackInfos) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (musicQualities.FLAC === selectedMusicQuality) {
|
if (musicQualities.FLAC === selectedMusicQuality) {
|
||||||
if (!fileSizeIsDefined(trackInfos.FILESIZE_FLAC)) {
|
if (fileSizeIsDefined(trackInfos.FILESIZE_FLAC)) {
|
||||||
if (!fileSizeIsDefined(trackInfos.FILESIZE_MP3_320)) {
|
if (fileSizeIsDefined(trackInfos.FILESIZE_MP3_320)) {
|
||||||
if (!fileSizeIsDefined(trackInfos.FILESIZE_MP3_128)) {
|
if (fileSizeIsDefined(trackInfos.FILESIZE_MP3_128)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return musicQualities.MP3_128;
|
return musicQualities.MP3_128;
|
||||||
|
@ -1879,9 +1879,9 @@ function getValidTrackQuality(trackInfos) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (musicQualities.MP3_320 === selectedMusicQuality) {
|
if (musicQualities.MP3_320 === selectedMusicQuality) {
|
||||||
if (!fileSizeIsDefined(trackInfos.FILESIZE_MP3_320)) {
|
if (fileSizeIsDefined(trackInfos.FILESIZE_MP3_320)) {
|
||||||
if (!fileSizeIsDefined(trackInfos.FILESIZE_FLAC)) {
|
if (fileSizeIsDefined(trackInfos.FILESIZE_FLAC)) {
|
||||||
if (!fileSizeIsDefined(trackInfos.FILESIZE_MP3_128)) {
|
if (fileSizeIsDefined(trackInfos.FILESIZE_MP3_128)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return musicQualities.MP3_128;
|
return musicQualities.MP3_128;
|
||||||
|
@ -1892,9 +1892,9 @@ function getValidTrackQuality(trackInfos) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (musicQualities.MP3_128 === selectedMusicQuality) {
|
if (musicQualities.MP3_128 === selectedMusicQuality) {
|
||||||
if (!fileSizeIsDefined(trackInfos.FILESIZE_MP3_128)) {
|
if (fileSizeIsDefined(trackInfos.FILESIZE_MP3_128)) {
|
||||||
if (!fileSizeIsDefined(trackInfos.FILESIZE_MP3_320)) {
|
if (fileSizeIsDefined(trackInfos.FILESIZE_MP3_320)) {
|
||||||
if (!fileSizeIsDefined(trackInfos.FILESIZE_FLAC)) {
|
if (fileSizeIsDefined(trackInfos.FILESIZE_FLAC)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return musicQualities.FLAC;
|
return musicQualities.FLAC;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "SMLoadr",
|
"name": "SMLoadr",
|
||||||
"version": "1.20.0",
|
"version": "1.21.0",
|
||||||
"description": "A streaming music downloader written in NodeJS.",
|
"description": "A streaming music downloader written in NodeJS.",
|
||||||
"author": "SMLoadrDev",
|
"author": "SMLoadrDev",
|
||||||
"license": "CC-BY-NC-4.0",
|
"license": "CC-BY-NC-4.0",
|
||||||
|
@ -15,16 +15,16 @@
|
||||||
"node": ">=9.0.0"
|
"node": ">=9.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cache-manager": "^2.10.0",
|
"bluebird": "^3.7.2",
|
||||||
|
"cache-manager": "^2.11.1",
|
||||||
"chalk": "^3.0.0",
|
"chalk": "^3.0.0",
|
||||||
"command-line-args": "^5.1.1",
|
"command-line-args": "^5.1.1",
|
||||||
"command-line-usage": "^6.1.0",
|
"command-line-usage": "^6.1.0",
|
||||||
"inquirer": "^7.0.1",
|
"inquirer": "^7.1.0",
|
||||||
"jsonfile": "^5.0.0",
|
"jsonfile": "^5.0.0",
|
||||||
"openurl": "^1.1.1",
|
"openurl": "^1.1.1",
|
||||||
"ora": "^4.0.3",
|
"ora": "^4.0.4",
|
||||||
"bluebird": "^3.7.2",
|
"request": "^2.88.2",
|
||||||
"request": "^2.88.0",
|
|
||||||
"request-plus": "^2.0.0",
|
"request-plus": "^2.0.0",
|
||||||
"sanitize-filename": "^1.6.3",
|
"sanitize-filename": "^1.6.3",
|
||||||
"winston": "^3.2.1"
|
"winston": "^3.2.1"
|
||||||
|
|
Loading…
Reference in New Issue