Skip to content

Commit 1807a43

Browse files
committed
fix: destination of danbooru non-image post
1 parent 3deb46d commit 1807a43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nazurin/sites/danbooru/api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def parse_post(self, post) -> Illust:
5656
title, filename = self._get_names(post)
5757
imgs = []
5858
files = []
59+
destination, filename = self.get_storage_dest(post, filename)
5960
if is_image(url):
60-
destination, filename = self.get_storage_dest(post, filename)
6161
imgs.append(
6262
Image(
6363
filename,
@@ -70,7 +70,7 @@ def parse_post(self, post) -> Illust:
7070
)
7171
)
7272
else: # danbooru has non-image posts, such as #animated
73-
files.append(File(filename, url))
73+
files.append(File(filename, url, destination))
7474

7575
# Build media caption
7676
tags = post["tag_string"].split(" ")

0 commit comments

Comments
 (0)