* feature, display tag-selection with preview-icons in photo index.
* feature, support for Nikon's NEF RAW photo format (via dcraw and ImageMagick).
* feature, auto-scroll in photo index if thumbnails are out of sight.
+ * feature, support F-Spot's rating values.
* bug, if tag added to hide-tags, don't show up in photo-details box (single-photo).
* bug, if tag added to hide-tags, don't allow adding to selected-tags list.
* bug, if tag added to hide-tags, random-photo needs to take care of it.
");
}
+ /* get F-Spot database version */
$this->dbver = $this->getFspotDBVersion();
if(!is_writeable($this->cfg->base_path ."/templates_c")) {
$this->tmpl->assign('web_path', $this->cfg->web_path);
+ /* Starting with F-Spot 0.4.2, the rating-feature was available */
+ if($this->dbver > 10) {
+ $this->sort_orders = array_merge($this->sort_orders, array(
+ 'rate_asc' => 'Rate ↑',
+ 'rate_desc' => 'Rate ↓',
+ ));
+ }
+
/* check if all necessary indices exist */
$this->checkDbIndices();
";
}
else {
- $query_str = "
- SELECT p.id, p.uri, p.time, p.description
- FROM photos p
- ";
+ /* till F-Spot version 0.4.1 */
+ if($this->dbver < 11) {
+ $query_str = "
+ SELECT p.id, p.uri, p.time, p.description
+ FROM photos p
+ ";
+ }
+ else {
+ $query_str = "
+ SELECT p.id, p.uri, p.time, p.description, p.rating
+ FROM photos p
+ ";
+ }
}
/* if show_tags is set, only return details for photos which
case 'tags_desc':
return " ORDER BY t.name DESC ,p.time ASC";
break;
+ case 'rate_asc':
+ return " ORDER BY t.name ASC, p.rating ASC";
+ break;
+ case 'rate_desc':
+ return " ORDER BY t.name DESC, p.rating DESC";
+ break;
}
} // get_sort_order()