syncthing / syncthing-android

Wrapper of syncthing for Android.
https://syncthing.net/
Mozilla Public License 2.0
3.38k stars 378 forks source link

MediaStore not updated #1818

Open Devon22 opened 2 years ago

Devon22 commented 2 years ago

The picture is deleted on the PC, and after syncing to Android, the MediaStore is not updated, and the result is shown in the following figure.

Screenshot_20220806-171206_Gallery

Version Information

App Version: 1.20.4
Syncthing Version: v1.20.4
Android Version: Android 12
tomasz1986 commented 2 years ago

Probably related to / caused by https://github.com/syncthing/syncthing-android/pull/1803.

imsodin commented 2 years ago

Yes it is. As I wrote there, I am very interested in hearing about methods to let androids mediastore know about a deletion or let it check for a path, or directory content - really anything that makes it pick up the deletion without actually scheduling a deletion.
One thing to try is using the .scanFile method, but all (inofficial) info I found indicates that's not going to do anything - so my motivation to test is quite low. So hints/contributions welcome.

steelbytes commented 2 years ago

Yes it is. As I wrote there, I am very interested in hearing about methods to let androids mediastore know about a deletion or let it check for a path, or directory content - really anything that makes it pick up the deletion without actually scheduling a deletion. One thing to try is using the .scanFile method, but all (inofficial) info I found indicates that's not going to do anything - so my motivation to test is quite low. So hints/contributions welcome.

stackoverflow says that you call MediaScannerConnection.scanFile with the name of the file that was just deleted. yes it seems counter intuitive at first but give it a go

Devon22 commented 1 year ago

Is it possible to fix this problem? Version 1.23.4 still has the same problem.