-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
reactively update the library + exif data #792
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #792 +/- ##
==========================================
+ Coverage 65.51% 70.01% +4.50%
==========================================
Files 137 100 -37
Lines 12903 11187 -1716
Branches 533 533
==========================================
- Hits 8453 7833 -620
+ Misses 4295 3354 -941
+ Partials 155 0 -155
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
this PR addresses #201 |
I'm all for this pull request. Sadly I don't know golang, but I'd like to voice my support for this. This would be super useful for me since I sync photos from my phone, I'd like to see them in Photoview right away (just like Google Photos does). I have a lot of users and photos on my server so periodic scans take a while. Plus this would be better than periodic scans because it scans when files are added, not timer-based. |
@amit-handa I created the #910 PR as an alternative to the |
thank you to all the contibutors/authors for maintaining the repo in a clean and easy to understand, organized way.
note: I am not even sure if this PR is the right way to contribute or begin. I just wanted to address a issue where photoview scan is resource intensive (cant find it rn) and fsnotify is a way to reactively sync photoview .
of course, only fsnotify is not going to ensure it remains in sync. periodic scan is needed to ensure missed events are reprocessed. For the same, I propose comparing
media.updated_at
db timefield with mediafile'smodtime
field and reprocess media if latter is updated.Detail
The server subscribes to fsnotify events for all the albums in the albums table. for each event, it ll sync photoview db + media_cache, as follows:
if the media file modtime is later than what exists in the db (media.updated_at time), then ideally the corresponding photoview data should be refreshed.
Current status of the PR: it worked on my manual testcase
I ll continue to work on it, test and ask for comments once its done. meanwhile, all advice, knowledge is welcome. golang is not my programming lang of expertise.
note: The PR is in a pretty bad condition currently. ll update it once I feel the code is production grade + testcases are there sufficiently.