Change to menu defaults if files not found on open

When opening an old devede project, if the background picture or
music files aren't there, an exception would happen. This can
happen even with the defaults, because in the last version, they
were migrated into a different folder.

Now, if the files aren't found, the new defaults will be used.
This commit is contained in:
Sergio Costas 2025-02-08 19:53:38 +01:00
parent 4143d9dd49
commit 9bd6d94c6c

View file

@ -673,4 +673,10 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
def restore_menu(self, data):
# check that the menu's background picture and music are there
if ('background_picture' in data) and (not os.path.exists(data['background_picture'])):
data['background_picture'] = self.default_background
if ('background_music' in data) and (not os.path.exists(data['background_music'])):
data['background_music'] = self.default_sound
self.unserialize(data)