GNOME Bugzilla – Bug 312613
inotify (directory watch) support in f-spot
Last modified: 2018-07-12 00:03:00 UTC
F-spot should support inotify so when the content of folders change the database is automatically updated.
Looks like the best way to implement this is with System.IO.FileSystemWatcher. This involves defining one or more directories that should be monitored. Perhaps a checkbox whether to enable future monitoring on a folder when importing from it? Personally I'd prefer to just set F-Spot to monitor my ~/Photos directory. What really excites me is combining this feature with iFolder. Also, said directories should be scanned on startup (lazily) for new and deleted files.
Agreed. F-spot doesn't detect my k750i as a camera, so I have to put my photos into my ~/Pictures directory manually, then fire up F-Spot and import it again. I think we are talking Gamin here, not inotify. Gamin is the userspace file system watcher GNOME apps use.
If the performance hit isn't too severe, System.IO.FileSystemWatcher should be used over the Linux specific methods like inotify. Either way, this feature is to me the most needed. A few good ideas showed up on the mailling list. on how to implement http://mail.gnome.org/archives/f-spot-list/2005-November/msg00110.html
*** Bug 341729 has been marked as a duplicate of this bug. ***
My proposal is using Meta Tracker instead of reinventing the wheel. Not only would it fix this bug, but also add several features from the ToDo/Goals list for free (async db/metadata, reconnect moved images, track moves, advanced tag querying). I posted a feature request about it: Bug 350728
*** Bug 357079 has been marked as a duplicate of this bug. ***
*** Bug 437703 has been marked as a duplicate of this bug. ***
*** Bug 432206 has been marked as a duplicate of this bug. ***
*** Bug 418335 has been marked as a duplicate of this bug. ***
*** Bug 460551 has been marked as a duplicate of this bug. ***
*** Bug 483759 has been marked as a duplicate of this bug. ***
I just wanted to say this bug is the main reason why I do not use f-spot. I hope it will be fixed soon and I can start using what I find a truly good piece of software.
Is there any feedback from the devs regarding this issue? The number of duplicates would suggest it is a feature many users would eagerly await, and it would be fine to know if it is at least planned to be done, or not. Other apps -take Rhythmbox- have been doing it forever, so I would expect it not to be very difficult to implement. Please, is it sound to keep waiting for this bug to be fixed or should I just abandon all hope?
I think this would be a great feature, and I've experimented with implementing it a few different times, but held off because of a memory leak issue with the Mono FileSystemWatcher. Unfortuantely that's where I got stalled the last time I looked - it might be time to revisit it and see if that bug is gone soon though.
*** Bug 509006 has been marked as a duplicate of this bug. ***
Some multimedia players (Rhythmbox, Listen, Amarok...) look for updates inside folders, maybe it could be a guide to make it possible in F-Spot. PD: A more descriptive title for this bug will solve the duplicate bug issue, normal users don't know what inotify means when they search for pre-existing bug ;)
*** Bug 443119 has been marked as a duplicate of this bug. ***
*** Bug 532509 has been marked as a duplicate of this bug. ***
I'm surprised that this feature isn't a priority. A Google search of "f-spot gthumb" brings up page after page of people identifying the lack of an automatic import / directory scanning feature as f-spot's major flaw and gthumb's major advantage. As others have noted, the best modern media organizers (e.g., Rhythmbox) have this kind of feature. It combines ease of use with flexibility. Aside from missing such an essential feature, F-spot is beautiful and works wonderfully. Hopefully this request will catch someone's attention.
Created attachment 114112 [details] [review] directorywatch.patch this patch adds a DirectoryWatch extension STUB. basically works, but has some collisions with import function which cannot be easily resolved now (in short when import is in progress the extension should be disabled, or better the extension should disable itself when import is in progress. now it's not and during import the extension is awakened and messes up everything :) )
A real user case to see how this feature is needed: My neighbours have very little skills in using a computer. They use a GNU/Linux distribution (Ubuntu) since I installed it on their computer, and are very happy with it. I've showed them how to use F-Spot. They where happy about the possibility of the software, but they miss-understood something: they believe that, if a photo is imported in F-Spot, they can delete it from their hard disk. Because the thumbnail is keep in the cache, they haven't notice anything during three month (on F-Spot, all thumbnails were here), and they loose their photos. If F-Spot have removed the photo (or display a notify) when photos was deleted, they would have understand their mistake before three months...
I'm removing F-Spot from my install. This is pure design failure. When this feature is announced I'll consider coming back. Picasa, here I go.
Beagle (http://beagle-project.org/Main_Page) uses inotify to successfully handle directory watching and is written in mono/c# so should be pretty easy to pick it up from there I'd have thought. A word from a developer on whether this is likely to be added anytime soon would be greatly appreciated.
(In reply to comment #23) > A word from a developer on whether this is likely to be added anytime soon > would be greatly appreciated. i'm not a developer but i'll try to answer. banshee doesn't use that yet, see bug #385965. and anyway your question is almost answered in comment #20: the patch is there (mostly coming from banshee!), but this feature, ready at 90%, needs some *big* work on f-spot's import process, which like most other tasks is not scheduled and due to developers' ***TIME*** and will. I am sorry but nobody will tell you WHEN this feature will be included. it's *surely* kept in (high) consideration (the patch is there to demonstrate), but don't ask for times. can be one month as well as one year! :) and please avoid comments like "picasa here i come": these are certainly not the encouragements which speed up development.
*** Bug 554809 has been marked as a duplicate of this bug. ***
I posted a bug that is a sub-bug of this bug. In particular, f-spot does not remove thumbnails for images that have been deleted from the hard disk. Here is an awful script that does that task. WARNING 1: I'm not talented with SQL/shells scripts. There is a good chance this will mess up your photos.db, so back it up first. WARNING 2: This will not delete photos from the database when the full path for the image file has special characters in it. That is, if you delete /home/whoever/Photos/blah&blah.jpg from the disk and it is in f-spot's database, this script will not delete it from the database because the filename has an ampersand in it. WARNING 3: Close f-spot before you run this script! #!/bin/sh sqlite3 ~/.gnome2/f-spot/photos.db 'SELECT uri FROM photos' | grep '^file:///' | sed -e 's/^file:\/\///' | grep -v '%' | while read FILE do if [ ! -e "${FILE}" ] then sqlite3 ~/.gnome2/f-spot/photos.db \ "SELECT id FROM photos WHERE photos.uri='file://${FILE}'"| while read PHOTO_ID do sqlite3 ~/.gnome2/f-spot/photos.db \ "DELETE FROM photo_versions WHERE photo_id=${PHOTO_ID};\ DELETE FROM photo_tags WHERE photo_id=${PHOTO_ID};\ DELETE FROM photos WHERE id=${PHOTO_ID};" done fi done
I'm looking towards inclusion of the patch, and thus adding me to the CC. If I have the time I will try to test the patch on a 0.5.0.3 F-Spot.
I'm also very eager to see this feature implemented in f-spot. Is there a way to implement this as an extension? would it be possible to pack the patch from Maxxer into an extension somehow? I really hope that this will come soon. At the moment I work-arround this by deleting the whole catalogue and re-importing all my +20k pictures. :-( Despite of that, f-spot is great! Thanx a lot!!
I'm also eagerly awaiting this feature. It's the only reason I don't use F-Spot! Thanks!
*** Bug 619513 has been marked as a duplicate of this bug. ***
Comment on attachment 114112 [details] [review] directorywatch.patch Maintenance update: In the past we've been less than stellar in reviewing patches. As such we have a pile of patches in bugzilla which are outdated and don't apply anymore. Am currently marking all of these as "needs-work". My apologies for this. Since I've become a maintainer of the project, I've set the personal rule of quickly reviewing all patches, to avoid that this happens again. If you (or anyone) wants to go through the trouble of updating this patch, please talk to us to figure out if it fits in the F-Spot long term roadmap. Should you, in the future, notice a patch lingering around for too long, please notify us immediately and we'll look into it, to avoid situations like these from happening again. You can filter these mails by searching for ###F-OLDPATCHCLEANUP###
As many, many others I'm eagerly awaiting folder watch for f-spot. It's the number 1 bug that keeps me from using F-Spot and instead using other, not so good, managers that does have folder watch. This bug here is more than 5 years old. 2 years ago Maxxer posted a first patch that fixes this issue, just needs some more work he said. So, are we going to get folder watch for F-Spot in the near future or should we stop hoping and settle with other managers?
Still waiting... but as the image collection is growing, reimporting the whole collection every now and then is starting to be a real nuisance. as david put's it: can we still hope, or shall we switch to another photo-manager? thanx for all your work!
still waiting... and hoping... thanx for all you work.
F-Spot has moved to https://github.com/f-spot/f-spot/issues If this Bugzilla ticket is still valid in a recent version of F-Spot, please feel free to post this topic as a ticket in the F-Spot project on GitHub. Closing this report as WONTFIX as part of Bugzilla Housekeeping as we are planning to shut down GNOME Bugzilla in favor of GNOME Gitlab.