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 497136 - new extension, retroactively adding old photos to new rolls
new extension, retroactively adding old photos to new rolls
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Import
SVN
Other Linux
: Normal enhancement
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-15 18:20 UTC by Andy Wingo
Modified: 2008-07-04 15:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
source, makefile, and addin.xml for extension (1.19 KB, application/x-compressed-tar)
2007-11-15 18:21 UTC, Andy Wingo
Details

Description Andy Wingo 2007-11-15 18:20:46 UTC
Hello hackers,

I wrote an extension to retroactively add old photos to newly-created rolls. A tarball with the source, makefile, and addin xml is attached.

The code creates a new roll with the import time being the maximum time of the currently selected photos.

I wrote the extension because I am interested in the presentational possibilities for the "roll" information -- specifically, I think that it forms a nice way for navigating in time from a web interface. It would be cleaner if there were API to assign an existing photo to a roll.

Let me know if you need anything,

Andy
Comment 1 Andy Wingo 2007-11-15 18:21:47 UTC
Created attachment 99154 [details]
source, makefile, and addin.xml for extension
Comment 2 Bengt Thuree 2007-11-15 18:30:20 UTC
Nice small Extension :)

Small nitpicking here...
Perhaps refactor it a bit to bring out a few commands into small methods.
No Exception catching on the database update.

Like the extension, and nice job getting a proper timestamp :)
Wish this one was there when I imported all my photos before...
Comment 3 Maxxer 2007-11-17 17:46:14 UTC
Two trivial comments:

1. I believe p.RollId = roll.Id; is useless. When filtering by roll a new query is issued so you don't need to keep the actual photo updated...
2. The description is reductive, because you may wish to split even a recent roll. i.e. if you imported in one batch the wedding photos and the trekking ones and want to divide them. ;)
Comment 4 Andy Wingo 2008-01-12 20:46:47 UTC
(In reply to comment #2)
> Small nitpicking here...
> Perhaps refactor it a bit to bring out a few commands into small methods.

It's just a hack :)

> No Exception catching on the database update.

I assume the exceptions will propagate up and print some kind of backtrace. I don't care to learn what exceptions need to be caught here.

> Like the extension, and nice job getting a proper timestamp :)
> Wish this one was there when I imported all my photos before...

Thanks!

(In reply to comment #3)
> Two trivial comments:
> 
> 1. I believe p.RollId = roll.Id; is useless. When filtering by roll a new query
> is issued so you don't need to keep the actual photo updated...

Better safe than sorry? But ok.

> 2. The description is reductive, because you may wish to split even a recent
> roll. i.e. if you imported in one batch the wedding photos and the trekking
> ones and want to divide them. ;)

Good point.

Anyways what's happening with this bug?
Comment 5 Andy Wingo 2008-07-04 14:46:16 UTC
Ping? :-(
Comment 6 Stephane Delcroix 2008-07-04 14:56:57 UTC
I guess that ping mean you'd like to have your extension on svn and in the repository ?
Comment 7 Stephane Delcroix 2008-07-04 15:15:44 UTC
committed in r4154

I'll build it and make it available for 0.4.4 and svn