podcast-dl 7.3.0 → 7.3.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 +6 -0
- package/bin/bin.js +1 -1
- package/bin/util.js +18 -24
- package/package.json +1 -1
package/bin/async.js
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
writeItemMeta,
|
|
23
23
|
writeToArchive,
|
|
24
24
|
getUrlEmbed,
|
|
25
|
+
getIsInArchive,
|
|
25
26
|
} from "./util.js";
|
|
26
27
|
|
|
27
28
|
const pipeline = promisify(stream.pipeline);
|
|
@@ -44,6 +45,11 @@ const download = async ({
|
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
if (key && archive && getIsInArchive({ key, archive })) {
|
|
49
|
+
logMessage("Download exists in archive. Skipping...");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
47
53
|
let embeddedUrl = null;
|
|
48
54
|
if (filterUrlTracking) {
|
|
49
55
|
logMessage("Attempting to find embedded URL...");
|
package/bin/bin.js
CHANGED
package/bin/util.js
CHANGED
|
@@ -215,22 +215,20 @@ const getItemsToDownload = ({
|
|
|
215
215
|
}),
|
|
216
216
|
});
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
});
|
|
233
|
-
}
|
|
218
|
+
const episodeImageName = getFilename({
|
|
219
|
+
item,
|
|
220
|
+
feed,
|
|
221
|
+
url: episodeAudioUrl,
|
|
222
|
+
ext: episodeImageFileExt,
|
|
223
|
+
template: episodeTemplate,
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
const outputImagePath = path.resolve(basePath, episodeImageName);
|
|
227
|
+
item._extra_downloads.push({
|
|
228
|
+
url: episodeImageUrl,
|
|
229
|
+
outputPath: outputImagePath,
|
|
230
|
+
key: episodeImageArchiveKey,
|
|
231
|
+
});
|
|
234
232
|
}
|
|
235
233
|
}
|
|
236
234
|
|
|
@@ -295,7 +293,7 @@ const logItemsList = ({
|
|
|
295
293
|
|
|
296
294
|
const writeFeedMeta = ({ outputPath, feed, key, archive, override }) => {
|
|
297
295
|
if (key && archive && getIsInArchive({ key, archive })) {
|
|
298
|
-
logMessage("Feed metadata exists in archive. Skipping
|
|
296
|
+
logMessage("Feed metadata exists in archive. Skipping...");
|
|
299
297
|
return;
|
|
300
298
|
}
|
|
301
299
|
|
|
@@ -312,7 +310,7 @@ const writeFeedMeta = ({ outputPath, feed, key, archive, override }) => {
|
|
|
312
310
|
if (override || !fs.existsSync(outputPath)) {
|
|
313
311
|
fs.writeFileSync(outputPath, JSON.stringify(output, null, 4));
|
|
314
312
|
} else {
|
|
315
|
-
logMessage("Feed metadata exists locally. Skipping
|
|
313
|
+
logMessage("Feed metadata exists locally. Skipping...");
|
|
316
314
|
}
|
|
317
315
|
|
|
318
316
|
if (key && archive && !getIsInArchive({ key, archive })) {
|
|
@@ -338,9 +336,7 @@ const writeItemMeta = ({
|
|
|
338
336
|
override,
|
|
339
337
|
}) => {
|
|
340
338
|
if (key && archive && getIsInArchive({ key, archive })) {
|
|
341
|
-
logMessage(
|
|
342
|
-
`${marker} | Episode metadata exists in archive. Skipping write...`
|
|
343
|
-
);
|
|
339
|
+
logMessage(`${marker} | Episode metadata exists in archive. Skipping...`);
|
|
344
340
|
return;
|
|
345
341
|
}
|
|
346
342
|
|
|
@@ -355,9 +351,7 @@ const writeItemMeta = ({
|
|
|
355
351
|
if (override || !fs.existsSync(outputPath)) {
|
|
356
352
|
fs.writeFileSync(outputPath, JSON.stringify(output, null, 4));
|
|
357
353
|
} else {
|
|
358
|
-
logMessage(
|
|
359
|
-
`${marker} | Episode metadata exists locally. Skipping write...`
|
|
360
|
-
);
|
|
354
|
+
logMessage(`${marker} | Episode metadata exists locally. Skipping...`);
|
|
361
355
|
}
|
|
362
356
|
|
|
363
357
|
if (key && archive && !getIsInArchive({ key, archive })) {
|