podcast-dl 8.0.7 → 8.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/async.js +0 -1
- package/bin/commander.js +1 -1
- package/bin/util.js +13 -2
- package/package.json +1 -1
package/bin/async.js
CHANGED
package/bin/commander.js
CHANGED
package/bin/util.js
CHANGED
|
@@ -36,7 +36,13 @@ const getJsonFile = (filePath) => {
|
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
const data = fs.readFileSync(fullPath);
|
|
40
|
+
|
|
41
|
+
if (!data) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return JSON.parse(data);
|
|
40
46
|
};
|
|
41
47
|
|
|
42
48
|
const getArchive = (archive) => {
|
|
@@ -349,7 +355,12 @@ const AUDIO_TYPES_TO_EXTS = {
|
|
|
349
355
|
const VALID_AUDIO_EXTS = [...new Set(Object.values(AUDIO_TYPES_TO_EXTS))];
|
|
350
356
|
|
|
351
357
|
const getIsAudioUrl = (url) => {
|
|
352
|
-
|
|
358
|
+
let ext;
|
|
359
|
+
try {
|
|
360
|
+
ext = getUrlExt(url);
|
|
361
|
+
} catch (err) {
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
353
364
|
|
|
354
365
|
if (!ext) {
|
|
355
366
|
return false;
|