podcast-dl 9.0.0 → 9.0.1

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
@@ -156,6 +156,7 @@ let downloadItemsAsync = async ({
156
156
  bitrate,
157
157
  episodeTemplate,
158
158
  episodeDigits,
159
+ episodeSourceOrder,
159
160
  exec,
160
161
  feed,
161
162
  includeEpisodeMeta,
@@ -173,7 +174,7 @@ let downloadItemsAsync = async ({
173
174
  const marker = threads > 1 ? `[${threadIndex}] ${item.title}` : item.title;
174
175
  const logMessage = getLogMessageWithMarker(marker);
175
176
  const { url: episodeAudioUrl, ext: audioFileExt } =
176
- getEpisodeAudioUrlAndExt(item);
177
+ getEpisodeAudioUrlAndExt(item, episodeSourceOrder);
177
178
 
178
179
  if (!episodeAudioUrl) {
179
180
  hasErrors = true;
package/bin/bin.js CHANGED
@@ -206,6 +206,7 @@ const main = async () => {
206
206
  bitrate,
207
207
  episodeTemplate,
208
208
  episodeDigits,
209
+ episodeSourceOrder,
209
210
  exec,
210
211
  feed,
211
212
  includeEpisodeMeta,
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("9.0.0")
7
+ .version("9.0.1")
8
8
  .option("--url <string>", "url to podcast rss feed")
9
9
  .option(
10
10
  "--out-dir <path>",
@@ -41,7 +41,7 @@ export const setupCommander = (commander, argv) => {
41
41
 
42
42
  return parsed;
43
43
  },
44
- "enclosure,link"
44
+ [AUDIO_ORDER_TYPES.enclosure, AUDIO_ORDER_TYPES.link]
45
45
  )
46
46
  .option("--include-meta", "write out podcast metadata to json")
47
47
  .option(
package/bin/naming.js CHANGED
@@ -2,7 +2,7 @@ import filenamify from "filenamify";
2
2
  import dayjs from "dayjs";
3
3
 
4
4
  const INVALID_CHAR_REPLACE = "_";
5
- const MAX_LENGTH_FILENAME = 255;
5
+ const MAX_LENGTH_FILENAME = 251; // account for ".tmp" files
6
6
 
7
7
  const getSafeName = (name) => {
8
8
  return filenamify(name, {
package/bin/util.js CHANGED
@@ -377,7 +377,7 @@ const AUDIO_ORDER_TYPES = {
377
377
 
378
378
  const getEpisodeAudioUrlAndExt = (
379
379
  { enclosure, link },
380
- order = [AUDIO_ORDER_TYPES.link, AUDIO_ORDER_TYPES.enclosure]
380
+ order = [AUDIO_ORDER_TYPES.enclosure, AUDIO_ORDER_TYPES.link]
381
381
  ) => {
382
382
  for (const source of order) {
383
383
  if (source === AUDIO_ORDER_TYPES.link && link && getIsAudioUrl(link)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podcast-dl",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "A CLI for downloading podcasts.",
5
5
  "type": "module",
6
6
  "bin": "./bin/bin.js",
@@ -51,7 +51,7 @@
51
51
  "command-exists": "^1.2.9",
52
52
  "commander": "^5.1.0",
53
53
  "dayjs": "^1.8.25",
54
- "filenamify": "^4.1.0",
54
+ "filenamify": "^6.0.0",
55
55
  "global-agent": "^3.0.0",
56
56
  "got": "^11.0.2",
57
57
  "p-limit": "^4.0.0",