fixed import thumbnail
This commit is contained in:
@@ -54,8 +54,7 @@ for filename in os.listdir(folder_path):
|
|||||||
with open(os.path.join(folder_path, filename), 'rb') as f:
|
with open(os.path.join(folder_path, filename), 'rb') as f:
|
||||||
video.file.save(filename, f)
|
video.file.save(filename, f)
|
||||||
|
|
||||||
filepath = find_image_file("V"+str(id), folder_path)
|
#filepath = find_image_file("V"+str(id), folder_path)
|
||||||
if filepath and os.path.exists(filepath):
|
|
||||||
with open(filepath, 'rb') as f:
|
with open(filepath, 'rb') as f:
|
||||||
video.thumbnail.save(filename, f)
|
video.thumbnail.save(filename, f)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user