(2012-04-05, 07:31)jmarshall Wrote: How do you plan on making the database schema generic, whilst still being sufficiently fast? eg, given that pictures as a concrete implementation with EXIF metadata (year, resolution, gps info, focus info etc), plus perhaps tags for content or for people in the pictures (eg from a picasa library), what sort of database layout would you expect you'd end up with?
How would that change if the content provider (plugin for example) offered a different set of organisational tags?
If the user then adds a flickr add-on, how would you see the process going of incorporating images from flickr alongside these other local images (either the users' own images, or images from other flickr users?)
Going off of
this data, EXIF contains a slew of metadata, some of which is worth keeping, and even less of which is worth sorting by. Would it speed things up if the non-sortable metadata was offloaded to a second table?
My idea for an extendable library is that there is data common to all photos (date, resolution, keywords, gps info, etc). Plugins may make additional information available (Picasa and Facebook add people tags for example; Flikr might add categories such as favorites). Plugin data would be stored in an separate table. When you view photos through the library, or run a global search, it will use the common data. When you view photos through a plugin, XBMC will provide the plugin with additional information from the separete table joined with the common table.
As far as the db layout, I would have to put some thought into it. (Should my GSoC application include the specifics of the db layout?) For starters, I'll turn to the MyPicsDB for inspiration. Here's a layout I drew of the db it uses:
Quote:What would the user expect to see in the UI from these, and how would you go about generating the necessary database queries?
The items shown in the UI are decided by the library (library.xbmc.pictures). As with the db layout, I'd have to think on which info should be shown when browsing the library, and which extended info should be shown when the user presses "i" on a photo. Ultimately, the useful vs. extraneous decision should be decided upon by multiple interested parties (Again, should my GSoC app include these specifics?)
Quote:Many users struggle with scanning videos. In most respects, you don't need an online metadata lookup for images, and at least for local images, there's really no reason at all not to scan as most info is in the files themselves. Given this, what process would the user go through to add a local source of images and scan metadata?
Libraries built on the new library by default only scan info from the files themselves. The base picture library uses EXIF, IPTC and XMP tags. Picture library plugins have access to additional file information. When a plugin scans an item to the library, the common data goes in the common library table and the additional info goes into the plugin's separate table.
The possibility for scraping data arrises when a picture library scraper addon is installed. For a picture library this makes no sense, but an anime library might want access to a scraper. In this case, after the user installs e.g. metadata.anime.anidb, they will have the option of scanning or scraping. Furthermore, scanning items to an anime library doesn't do a lot of good without the metadata, so at the the library's option, normal scanning can be disabled, forcing the user to scrape with an available scraper.