Permalink
Browse files

Don't add images in media enclosures if the URL is found in the story…

… already.
  • Loading branch information...
1 parent 2517f90 commit de59c9471c0f81503ee74274df6f6b0e172c7f96 @samuelclay committed Apr 21, 2017
Showing with 1 addition and 1 deletion.
  1. +1 −1 utils/story_functions.py
View
@@ -133,7 +133,7 @@ def pre_process_story(entry, encoding):
'media_url': media_url,
'media_type': media_type
}
- elif 'image' in media_type and media_url:
+ elif 'image' in media_type and media_url and media_url not in entry['story_content']:
entry['story_content'] += """<br><br><img src="%s" />""" % media_url
continue
elif media_content.get('rel', '') == 'alternative' or 'text' in media_content.get('type', ''):

0 comments on commit de59c94

Please sign in to comment.