Skip to content

Commit 854fefd

Browse files
committed
Restore saving of thumbnail paths
To preserve backwards compatibility with OpenShot 2.4.4, it's best if project files continue to store the thumbnail path for now.
1 parent ef6c7ce commit 854fefd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/classes/project_data.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def new(self):
269269
self.has_unsaved_changes = False
270270

271271
# Reset info paths
272-
info.THUMBNAIL_PATH = os.path.join(info.USER_PATH, "thumbnail")
272+
info.THUMBNAIL_PATH = os.path.join(info.USER_PATH, "thumbnail")
273273
info.TITLE_PATH = os.path.join(info.USER_PATH, "title")
274274
info.BLENDER_PATH = os.path.join(info.USER_PATH, "blender")
275275

@@ -835,8 +835,8 @@ def move_temp_paths_to_project_folder(self, file_path, previous_path=None):
835835
for file in self._data["files"]:
836836
path = file["path"]
837837

838-
# No longer store thumbnail image
839-
file["image"] = ""
838+
# For now, store thumbnail path for backwards compatibility
839+
file["image"] = os.path.join(target_thumb_path, "{}.png".format(file["id"]))
840840

841841
# Assets which need to be copied
842842
new_asset_path = None
@@ -872,8 +872,8 @@ def move_temp_paths_to_project_folder(self, file_path, previous_path=None):
872872
for clip in self._data["clips"]:
873873
file_id = clip["file_id"]
874874

875-
# No longer store thumbnail image
876-
clip["image"] = ""
875+
# For now, store thumbnail path for backwards compatibility
876+
clip["image"] = os.path.join(target_thumb_path, "{}.png".format(file_id))
877877

878878
log.info("Checking clip {} path for file {}".format(clip["id"], file_id))
879879
# Update paths to files stored in our working space or old path structure

0 commit comments

Comments
 (0)