summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/fantia.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/fantia.py')
-rw-r--r--gallery_dl/extractor/fantia.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/gallery_dl/extractor/fantia.py b/gallery_dl/extractor/fantia.py
index f1d51e2..4a67695 100644
--- a/gallery_dl/extractor/fantia.py
+++ b/gallery_dl/extractor/fantia.py
@@ -42,7 +42,11 @@ class FantiaExtractor(Extractor):
post = self._get_post_data(post_id)
post["num"] = 0
- for content in self._get_post_contents(post):
+ contents = self._get_post_contents(post)
+ post["content_count"] = len(contents)
+ post["content_num"] = 0
+
+ for content in contents:
files = self._process_content(post, content)
yield Message.Directory, post
@@ -59,6 +63,8 @@ class FantiaExtractor(Extractor):
post["content_filename"] or file["file_url"], post)
yield Message.Url, file["file_url"], post
+ post["content_num"] += 1
+
def posts(self):
"""Return post IDs"""
@@ -131,6 +137,7 @@ class FantiaExtractor(Extractor):
post["content_filename"] = content.get("filename") or ""
post["content_id"] = content["id"]
post["content_comment"] = content.get("comment") or ""
+ post["content_num"] += 1
post["plan"] = content["plan"] or self._empty_plan
files = []