koztv-blog-tools 1.2.3 → 1.2.4
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/dist/index.js +2 -5
- package/dist/index.mjs +2 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -804,10 +804,6 @@ async function exportAndTranslate(options) {
|
|
|
804
804
|
let skipped = 0;
|
|
805
805
|
for (const post of exportResult.posts) {
|
|
806
806
|
const postId = `${post.channelUsername}-${post.msgId}`;
|
|
807
|
-
if (processedLog[postId]) {
|
|
808
|
-
skipped++;
|
|
809
|
-
continue;
|
|
810
|
-
}
|
|
811
807
|
if (!post.content && !post.hasMedia) {
|
|
812
808
|
skipped++;
|
|
813
809
|
continue;
|
|
@@ -818,8 +814,9 @@ Processing: ${postId}`);
|
|
|
818
814
|
const created = await processPost(post, options, exportDir);
|
|
819
815
|
if (created.length > 0) {
|
|
820
816
|
processed++;
|
|
817
|
+
const existing = processedLog[postId]?.posts || [];
|
|
821
818
|
processedLog[postId] = {
|
|
822
|
-
posts: created,
|
|
819
|
+
posts: [.../* @__PURE__ */ new Set([...existing, ...created])],
|
|
823
820
|
date: post.date.toISOString(),
|
|
824
821
|
processedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
825
822
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -747,10 +747,6 @@ async function exportAndTranslate(options) {
|
|
|
747
747
|
let skipped = 0;
|
|
748
748
|
for (const post of exportResult.posts) {
|
|
749
749
|
const postId = `${post.channelUsername}-${post.msgId}`;
|
|
750
|
-
if (processedLog[postId]) {
|
|
751
|
-
skipped++;
|
|
752
|
-
continue;
|
|
753
|
-
}
|
|
754
750
|
if (!post.content && !post.hasMedia) {
|
|
755
751
|
skipped++;
|
|
756
752
|
continue;
|
|
@@ -761,8 +757,9 @@ Processing: ${postId}`);
|
|
|
761
757
|
const created = await processPost(post, options, exportDir);
|
|
762
758
|
if (created.length > 0) {
|
|
763
759
|
processed++;
|
|
760
|
+
const existing = processedLog[postId]?.posts || [];
|
|
764
761
|
processedLog[postId] = {
|
|
765
|
-
posts: created,
|
|
762
|
+
posts: [.../* @__PURE__ */ new Set([...existing, ...created])],
|
|
766
763
|
date: post.date.toISOString(),
|
|
767
764
|
processedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
768
765
|
};
|