mirror of https://gitlab.com/bashrc2/epicyon
Apply filtering to image creator details
parent
6053d3b725
commit
b93a8b799f
3
blog.py
3
blog.py
|
@ -280,7 +280,8 @@ def _html_blog_post_content(debug: bool, session, authorized: bool,
|
|||
like_str, bookmark_str,
|
||||
delete_str, mute_str,
|
||||
json_content,
|
||||
minimize_all_images)
|
||||
minimize_all_images,
|
||||
system_language)
|
||||
if attachment_str:
|
||||
blog_str += '<br><center>' + attachment_str + '</center>'
|
||||
if json_content:
|
||||
|
|
|
@ -2387,7 +2387,8 @@ def individual_post_as_html(signing_priv_key_pem: str,
|
|||
reply_str, announce_str, like_str,
|
||||
bookmark_str, delete_str, mute_str,
|
||||
content_str,
|
||||
minimize_all_images)
|
||||
minimize_all_images,
|
||||
system_language)
|
||||
|
||||
published_str = \
|
||||
_get_published_date_str(post_json_object, show_published_date_only,
|
||||
|
|
|
@ -30,6 +30,7 @@ from utils import get_image_extensions
|
|||
from utils import local_actor_url
|
||||
from utils import text_in_file
|
||||
from utils import remove_eol
|
||||
from filters import is_filtered
|
||||
from cache import store_person_in_cache
|
||||
from content import add_html_tags
|
||||
from content import replace_emoji_from_tags
|
||||
|
@ -1212,7 +1213,8 @@ def get_post_attachments_as_html(base_dir: str,
|
|||
bookmark_str: str, delete_str: str,
|
||||
mute_str: str,
|
||||
content: str,
|
||||
minimize_all_images: bool) -> (str, str):
|
||||
minimize_all_images: bool,
|
||||
system_language: str) -> (str, str):
|
||||
"""Returns a string representing any attachments
|
||||
"""
|
||||
attachment_str = ''
|
||||
|
@ -1235,10 +1237,16 @@ def get_post_attachments_as_html(base_dir: str,
|
|||
continue
|
||||
media_license = ''
|
||||
if attach.get('schema:license'):
|
||||
media_license = attach['schema:license']
|
||||
if not is_filtered(base_dir, nickname, domain,
|
||||
attach['schema:license'],
|
||||
system_language):
|
||||
media_license = attach['schema:license']
|
||||
media_creator = ''
|
||||
if attach.get('schema:creator'):
|
||||
media_creator = attach['schema:creator']
|
||||
if not is_filtered(base_dir, nickname, domain,
|
||||
attach['schema:creator'],
|
||||
system_language):
|
||||
media_creator = attach['schema:creator']
|
||||
|
||||
media_type = attach['mediaType']
|
||||
image_description = ''
|
||||
|
|
Loading…
Reference in New Issue