Skip to content

Commit 0e19236

Browse files
author
Cimon Lucas (LCM)
committed
Minor update
1 parent 56ffd3e commit 0e19236

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

image_preview_thumbnailer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def process_link(img_downloader, anchor_tag, url_match, config=PluginConfig()):
148148
LOGGER.info("Thumbnail does not exist for %s => downloading image from %s", thumb_filename, anchor_tag['href'])
149149
tmp_thumb_filepath = img_downloader(url_match, config)
150150
if not tmp_thumb_filepath: # => means the downloader failed to retrieve the image in a "supported" case
151-
with open(config.fs_thumbs_dir(thumb_filename + '.none'), 'w', encoding='utf8'):
151+
hostname = urlparse(anchor_tag['href']).netloc
152+
with open(config.fs_thumbs_dir(f'{thumb_filename}.{hostname}.none'), 'w', encoding='utf8'):
152153
pass
153154
return
154155
img_ext = os.path.splitext(tmp_thumb_filepath)[1]

0 commit comments

Comments
 (0)