Add nsfw hashtag to podcasts marked as explicit

merge-requests/30/head
Bob Mottram 2022-01-13 21:16:52 +00:00
parent dd67e64417
commit 3d2072aae9
1 changed files with 3 additions and 0 deletions

View File

@ -226,6 +226,9 @@ def _add_newswire_dict_entry(base_dir: str, domain: str,
# extract hashtags from the text of the feed post
post_tags = get_newswire_tags(all_text, max_tags)
if podcast_properties.get('explicit'):
post_tags.append('#NSFW')
# Include tags from podcast categories
if podcast_properties:
post_tags += podcast_properties['categories']