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,
|
like_str, bookmark_str,
|
||||||
delete_str, mute_str,
|
delete_str, mute_str,
|
||||||
json_content,
|
json_content,
|
||||||
minimize_all_images)
|
minimize_all_images,
|
||||||
|
system_language)
|
||||||
if attachment_str:
|
if attachment_str:
|
||||||
blog_str += '<br><center>' + attachment_str + '</center>'
|
blog_str += '<br><center>' + attachment_str + '</center>'
|
||||||
if json_content:
|
if json_content:
|
||||||
|
|
|
@ -2387,7 +2387,8 @@ def individual_post_as_html(signing_priv_key_pem: str,
|
||||||
reply_str, announce_str, like_str,
|
reply_str, announce_str, like_str,
|
||||||
bookmark_str, delete_str, mute_str,
|
bookmark_str, delete_str, mute_str,
|
||||||
content_str,
|
content_str,
|
||||||
minimize_all_images)
|
minimize_all_images,
|
||||||
|
system_language)
|
||||||
|
|
||||||
published_str = \
|
published_str = \
|
||||||
_get_published_date_str(post_json_object, show_published_date_only,
|
_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 local_actor_url
|
||||||
from utils import text_in_file
|
from utils import text_in_file
|
||||||
from utils import remove_eol
|
from utils import remove_eol
|
||||||
|
from filters import is_filtered
|
||||||
from cache import store_person_in_cache
|
from cache import store_person_in_cache
|
||||||
from content import add_html_tags
|
from content import add_html_tags
|
||||||
from content import replace_emoji_from_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,
|
bookmark_str: str, delete_str: str,
|
||||||
mute_str: str,
|
mute_str: str,
|
||||||
content: str,
|
content: str,
|
||||||
minimize_all_images: bool) -> (str, str):
|
minimize_all_images: bool,
|
||||||
|
system_language: str) -> (str, str):
|
||||||
"""Returns a string representing any attachments
|
"""Returns a string representing any attachments
|
||||||
"""
|
"""
|
||||||
attachment_str = ''
|
attachment_str = ''
|
||||||
|
@ -1235,9 +1237,15 @@ def get_post_attachments_as_html(base_dir: str,
|
||||||
continue
|
continue
|
||||||
media_license = ''
|
media_license = ''
|
||||||
if attach.get('schema:license'):
|
if attach.get('schema:license'):
|
||||||
|
if not is_filtered(base_dir, nickname, domain,
|
||||||
|
attach['schema:license'],
|
||||||
|
system_language):
|
||||||
media_license = attach['schema:license']
|
media_license = attach['schema:license']
|
||||||
media_creator = ''
|
media_creator = ''
|
||||||
if attach.get('schema:creator'):
|
if attach.get('schema:creator'):
|
||||||
|
if not is_filtered(base_dir, nickname, domain,
|
||||||
|
attach['schema:creator'],
|
||||||
|
system_language):
|
||||||
media_creator = attach['schema:creator']
|
media_creator = attach['schema:creator']
|
||||||
|
|
||||||
media_type = attach['mediaType']
|
media_type = attach['mediaType']
|
||||||
|
|
Loading…
Reference in New Issue