From 651d6c4447156e7bcae902ad247f599f12ff5dfc Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 31 Oct 2020 07:56:19 -0400 Subject: [PATCH] bold snapshots over 50MB --- archivebox/core/admin.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/archivebox/core/admin.py b/archivebox/core/admin.py index a061cd9d..14328519 100644 --- a/archivebox/core/admin.py +++ b/archivebox/core/admin.py @@ -131,10 +131,17 @@ class SnapshotAdmin(admin.ModelAdmin): return get_icons(obj) def size(self, obj): + archive_size = obj.archive_size + if archive_size: + size_txt = printable_filesize(archive_size) + if archive_size > 52428800: + size_txt = mark_safe(f'{size_txt}') + else: + size_txt = 'pending' return format_html( '{}', obj.archive_path, - printable_filesize(obj.archive_size) if obj.archive_size else 'pending', + size_txt, ) def url_str(self, obj):