Skip to content

Commit caf451a

Browse files
committed
Fix image network for Telegram images
1 parent 96528d1 commit caf451a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

processors/networks/image-network.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ def process(self):
139139
file_url_map = {v["filename"]: u for u, v in metadata.items()}
140140
for url, details in metadata.items():
141141
for item_id in details.get("post_ids", []):
142+
if self.source_dataset.type.endswith("-telegram"):
143+
# telegram has weird IDs
144+
item_id = "-".join(details["filename"].split("-")[:-1]) + "-" + str(item_id)
142145
id_file_map[item_id] = details["filename"]
143146

144147
root_dataset = None

0 commit comments

Comments
 (0)