[Shotwell] db design question
Jim Nelson
jim at yorba.org
Mon Jan 10 20:20:18 UTC 2011
In TagTable (and elsewhere), Shotwell uses source ID's rather than simple
row IDs. There are a few reasons for this, but what it comes down to is
that tags can hold multiple types of media: photos and videos (and perhaps
more in the future). A source ID is a combination of a media name ("thumb"
here) and the row ID in that media's database.
Why "thumb"? It's a legacy thing from when Shotwell only dealt with
photos. Since these values are never visible to the user (and aren't even
examined much in the code once they've been converted into in-memory
objects), they should be treated like opaque tokens. When examining the
database, mentally convert "thumb" to "photo" and the value to the right of
it to a row ID, and you're set.
-- Jim
On Sat, Jan 8, 2011 at 5:33 AM, Kent Tenney <ktenney at gmail.com> wrote:
> Howdy,
>
> Looking at photo.db.TagTable, I see a list containing items like
> thumb0000000000001677, which evidently refers to a thumbnail.
> I would expect to see mention of a field in PhotoTable.
>
> How does Shotwell connect tag names to image files?
>
> Thanks,
> Kent
> _______________________________________________
> Shotwell mailing list
> Shotwell at lists.yorba.org
> http://lists.yorba.org/cgi-bin/mailman/listinfo/shotwell
>
More information about the Shotwell-list
mailing list