Thumbnails for images and videos #87

Merged
Anna Sirota merged 28 commits from thumbnails into main 2024-04-25 17:50:58 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit f1da81b250 - Show all commits

View File

@ -20,7 +20,7 @@ def scan_selected_files(self, request, queryset):
def make_thumbnails(self, request, queryset):
"""Schedule thumbnails generationg for selected files."""
"""Schedule thumbnails generation for selected files."""
for instance in queryset.filter(type__in=(File.TYPES.IMAGE, File.TYPES.VIDEO)):
files.tasks.make_thumbnails(file_id=instance.pk)

View File

@ -6,7 +6,7 @@
</div>
{% endfor %}
{# alert about unexpected size of the default thumbnail, which might happen if source file was smaller than 1080p #}
{# TODO: do we want to make minimum resolusion a validation criteria during upload instead? #}
{# TODO: do we want to make minimum resolution a validation criteria during upload instead? #}
{% if file.thumbnail.width != THUMBNAIL_SIZE_L.0 or file.thumbnail.height != THUMBNAIL_SIZE_L.1 %}
<p>
<b class="icon-alert"></b> Expected {{ THUMBNAIL_SIZE_L.0 }}x{{ THUMBNAIL_SIZE_L.1 }}px,