After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 312613 - inotify (directory watch) support in f-spot
inotify (directory watch) support in f-spot
Status: RESOLVED WONTFIX
Product: f-spot
Classification: Other
Component: General
WISHLIST
Other Linux
: Normal enhancement
: ---
Assigned To: F-spot maintainers
F-spot maintainers
gnome[unmaintained]
: 341729 357079 418335 432206 437703 443119 460551 483759 509006 532509 554809 619513 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-04 20:49 UTC by joseph bourez
Modified: 2018-07-12 00:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
directorywatch.patch (9.46 KB, patch)
2008-07-07 12:15 UTC, Maxxer
needs-work Details | Review

Description joseph bourez 2005-08-04 20:49:57 UTC
F-spot should support inotify so when the content of folders change the database
is automatically updated.
Comment 1 Gabriel Burt 2005-08-12 07:39:35 UTC
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.
Comment 2 Alexander “weej” Jones 2005-12-12 18:31:35 UTC
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.
Comment 3 Richard Ayotte 2006-01-02 19:13:53 UTC
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
Comment 4 Gabriel Burt 2006-06-14 18:26:45 UTC
*** Bug 341729 has been marked as a duplicate of this bug. ***
Comment 5 Johan Kiviniemi 2006-08-10 13:41:08 UTC
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
Comment 6 Gabriel Burt 2006-09-25 22:34:41 UTC
*** Bug 357079 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Van Machelen 2007-05-12 09:49:18 UTC
*** Bug 437703 has been marked as a duplicate of this bug. ***
Comment 8 Stephane Delcroix 2007-06-11 15:02:04 UTC
*** Bug 432206 has been marked as a duplicate of this bug. ***
Comment 9 Stephane Delcroix 2007-06-11 15:02:18 UTC
*** Bug 418335 has been marked as a duplicate of this bug. ***
Comment 10 Stephane Delcroix 2007-07-26 12:57:24 UTC
*** Bug 460551 has been marked as a duplicate of this bug. ***
Comment 11 Stephane Delcroix 2007-10-07 12:10:28 UTC
*** Bug 483759 has been marked as a duplicate of this bug. ***
Comment 12 David Prieto 2007-11-02 08:08:12 UTC
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.
Comment 13 David Prieto 2007-12-03 10:29:23 UTC
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?
Comment 14 Gabriel Burt 2007-12-03 18:08:05 UTC
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.
Comment 15 Maxxer 2008-01-12 19:32:09 UTC
*** Bug 509006 has been marked as a duplicate of this bug. ***
Comment 16 Nukeador 2008-01-12 19:41:39 UTC
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 ;)
Comment 17 Maxxer 2008-03-14 09:32:21 UTC
*** Bug 443119 has been marked as a duplicate of this bug. ***
Comment 18 Tim Retout 2008-05-10 18:41:43 UTC
*** Bug 532509 has been marked as a duplicate of this bug. ***
Comment 19 Walter 2008-05-18 21:48:28 UTC
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.
Comment 20 Maxxer 2008-07-07 12:15:28 UTC
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 :) )
Comment 21 Florian Birée 2008-07-07 12:42:42 UTC
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...
Comment 22 Aleve Sicofante 2008-08-08 03:28:01 UTC
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.
Comment 23 Darren Davison 2008-09-16 21:23:20 UTC
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.
Comment 24 Maxxer 2008-09-16 22:08:36 UTC
(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. 
Comment 25 Maxxer 2008-10-03 21:44:51 UTC
*** Bug 554809 has been marked as a duplicate of this bug. ***
Comment 26 Eric 2008-10-04 04:27:05 UTC
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
Comment 27 Olivier Cortes 2009-02-24 21:59:45 UTC
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.
Comment 28 gnome.org 2009-08-30 18:18:17 UTC
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!!
Comment 29 Travis Poppe 2009-11-24 18:49:51 UTC
I'm also eagerly awaiting this feature. It's the only reason I don't use F-Spot!

Thanks!
Comment 30 Ruben Vermeersch 2010-05-24 13:40:16 UTC
*** Bug 619513 has been marked as a duplicate of this bug. ***
Comment 31 Ruben Vermeersch 2010-06-24 14:43:09 UTC
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###
Comment 32 david 2010-08-12 18:35:55 UTC
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?
Comment 33 gnome.org 2011-01-08 08:51:43 UTC
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!
Comment 34 gnome.org 2011-04-22 02:14:12 UTC
still waiting... and hoping...

thanx for all you work.
Comment 35 André Klapper 2018-07-12 00:03:00 UTC
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.