In flatpak version, ask users if they want to import the photo database from the old location
Please describe the problem you are trying to solve
I've installed Shotwell 0.30.8 from Flathub on Fedora Silverblue. I've used regular shotwell in the past for a number of years as a regular distro package.
When launching Shotwell (flatpak version) for the first time it appears a dialog asking to import photos as if it were the first time using the app. All the photos and events I previously had are gone.
As I know a little how Shotwell and flatpak work I've solved this issue with this steps:
- Close Shotwell without doing nothing
- Copy the photo database from the old location to the flaptak location:
cp $HOME/.local/share/shotwell/data/photo.db $HOME/.var/app/org.gnome.Shotwell/data/shotwell/data/
- Open Showell again. Now all my photos and events are back
I think Shotwell should detect somehow that is running as a flatpak application and, in case there are no photos in the database, ask the users if they want to import the database from the non-flatpaked version. That will lead to a better user experience
In order to access to $HOME/.local/share/shotwell/data/photo.db without having extra permissions in the flatpak build manifests maybe the import database dialog could prompt the users to open $HOME/.local/share/shotwell/data/photo.db. I think that would dynamically give access to the file, but flatpak experts might have to confirm this theory...
Thanks a lot for your work!