Remove: redundant file hash check for video thumb

This commit is contained in:
Aroy-Art 2025-03-11 21:01:40 +01:00
parent 61780cb8ba
commit febb9ce668
Signed by: Aroy
GPG key ID: 583642324A1D2070

View file

@ -114,9 +114,6 @@ def generate_video_thumbnail(
thumbnail_hash_blake3 = compute_file_hash_blake3(thumbnail_file_path) thumbnail_hash_blake3 = compute_file_hash_blake3(thumbnail_file_path)
if pstfile.thumbnail_hash_blake3 == thumbnail_hash_blake3:
return "Thumbnail already exists for this video file."
# Update the PostFileModel's thumbnail field with the new file # Update the PostFileModel's thumbnail field with the new file
with open(thumbnail_file_path, "rb") as file: with open(thumbnail_file_path, "rb") as file:
pstfile.thumbnail.save(thumbnail_filename, file) pstfile.thumbnail.save(thumbnail_filename, file)