Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
Cimon Lucas (LCM) committed Dec 28, 2024
1 parent 56ffd3e commit a52cf80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion image_preview_thumbnailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def process_link(img_downloader, anchor_tag, url_match, config=PluginConfig()):
LOGGER.info("Thumbnail does not exist for %s => downloading image from %s", thumb_filename, anchor_tag['href'])
tmp_thumb_filepath = img_downloader(url_match, config)
if not tmp_thumb_filepath: # => means the downloader failed to retrieve the image in a "supported" case
with open(config.fs_thumbs_dir(thumb_filename + '.none'), 'w', encoding='utf8'):
hostname = urlparse(anchor_tag['href']).netloc
with open(config.fs_thumbs_dir(thumb_filename f'{hostname}.none'), 'w', encoding='utf8'):
pass
return
img_ext = os.path.splitext(tmp_thumb_filepath)[1]
Expand Down

0 comments on commit a52cf80

Please sign in to comment.