mirror of https://gitlab.com/bashrc2/epicyon
Attach license to images
parent
f7d320861c
commit
ec704d6afe
6
media.py
6
media.py
|
@ -599,6 +599,12 @@ def attach_media(base_dir: str, http_prefix: str,
|
|||
'type': 'Document',
|
||||
'url': http_prefix + '://' + domain + '/' + media_path
|
||||
}
|
||||
if content_license_url:
|
||||
attachment_json['@context'] = [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{'schema': 'https://schema.org#'}
|
||||
]
|
||||
attachment_json['schema:license'] = content_license_url
|
||||
if media_type.startswith('image/'):
|
||||
attachment_json['blurhash'] = _get_blur_hash()
|
||||
# find the dimensions of the image and add them as metadata
|
||||
|
|
Loading…
Reference in New Issue