Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rescan folder using MediaScanner after state flips from syncing to 100% idle #626

Open
Catfriend1 opened this issue Apr 2, 2020 · 2 comments

Comments

@Catfriend1
Copy link
Owner

Description of the issue

syncthing/syncthing-android#1488

We need some pretty small and effective code with good error catching to do the following:

  • If a folder state transitions from "syncing" to "idle 100%" check if .nomedia files are present in the folder
  • If one or more of them are present, rescan the folder with MediaScanner.
@bell07
Copy link

bell07 commented Apr 2, 2020

My proposal is to remember during sync if any ".nomedia" file was added, changed or deleted. If they was such change, trigger the full rescan of the folder that contains the changed file, after the sync was completed.

Example: Syncthing folder is MySync. File "MySync/Photos/random/.nomedia" was created => result is rescan of "MySync/Photos/random/" after MySync was fully synchronized.

@Catfriend1
Copy link
Owner Author

Yes, the idea is good, but I currently can't make up my mind for a light implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants