From 2f2cb45947ac2bed2ba55f8f56e1c41a1b683848 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 16 May 2023 21:55:05 +0200 Subject: [PATCH] fixed import thumbnail --- import.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/import.py b/import.py index 615918d..0e66e23 100644 --- a/import.py +++ b/import.py @@ -54,10 +54,9 @@ for filename in os.listdir(folder_path): with open(os.path.join(folder_path, filename), 'rb') as f: video.file.save(filename, f) - filepath = find_image_file("V"+str(id), folder_path) - if filepath and os.path.exists(filepath): - with open(filepath, 'rb') as f: - video.thumbnail.save(filename, f) + #filepath = find_image_file("V"+str(id), folder_path) + with open(filepath, 'rb') as f: + video.thumbnail.save(filename, f) # Save the Video object to the database video.save()