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 CHANGED
@@ -224,7 +224,6 @@ let downloadItemsAsync = async ({
224
224
 
225
225
  for (const extra of item._extra_downloads) {
226
226
  try {
227
- logMessage("Downloading episode image...");
228
227
  await download({
229
228
  archive,
230
229
  override,
package/bin/commander.js CHANGED
@@ -4,7 +4,7 @@ import { logErrorAndExit } from "./logger.js";
4
4
 
5
5
  export const setupCommander = (commander, argv) => {
6
6
  commander
7
- .version("8.0.7")
7
+ .version("8.0.8")
8
8
  .option("--url <string>", "url to podcast rss feed")
9
9
  .option(
10
10
  "--out-dir <path>",
package/bin/util.js CHANGED
@@ -36,7 +36,13 @@ const getJsonFile = (filePath) => {
36
36
  return null;
37
37
  }
38
38
 
39
- return JSON.parse(fs.readFileSync(fullPath));
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
- const ext = getUrlExt(url);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podcast-dl",
3
- "version": "8.0.7",
3
+ "version": "8.0.8",
4
4
  "description": "A CLI for downloading podcasts.",
5
5
  "type": "module",
6
6
  "bin": "./bin/bin.js",