Add SHRINK_OLD_MEDIA_METADATA setting

This commit is contained in:
tcely 2025-01-09 14:22:37 -05:00 committed by GitHub
parent 1ff8dfda98
commit 6292a9a59d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1168,6 +1168,8 @@ class Media(models.Model):
if old_mdl > new_mdl:
delta = old_mdl - new_mdl
log.info(f'{self.key}: metadata reduced by {delta:,} characters ({old_mdl:,} -> {new_mdl:,})')
if getattr(settings, 'SHRINK_OLD_MEDIA_METADATA', False):
self.metadata = filtered_json
@property