diff options
Diffstat (limited to 'src/items.c')
| -rw-r--r-- | src/items.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/items.c b/src/items.c index 31ab41f..b3f1fac 100644 --- a/src/items.c +++ b/src/items.c @@ -183,6 +183,9 @@ parse_album_xml (const gchar *filename, TPathInfo *path_info) index->metadata_fake_datetime = parse_datetime_string (s); g_free (s); } + index->metadata_fake_aperture = xml_file_get_node_attribute_double (xml, "/gallery/general/metadata/fake", "aperture", -1); + index->metadata_fake_focal_length = xml_file_get_node_attribute_double (xml, "/gallery/general/metadata/fake", "focal_length", -1); + /* TODO: add support for lens name */ s = xml_file_get_node_attribute (xml, "/gallery/general/thumbnail", "crop"); if (s != NULL) { @@ -329,11 +332,14 @@ parse_album_xml (const gchar *filename, TPathInfo *path_info) item->metadata_fake_datetime = (time_t) -1; s = g_strdup_printf ("/gallery/items/*[%d]/metadata/fake", i + 1); s2 = xml_file_get_node_attribute (xml, s, "date"); - g_free (s); if (s2 != NULL) { item->metadata_fake_datetime = parse_datetime_string (s2); g_free (s2); } + item->metadata_fake_aperture = xml_file_get_node_attribute_double (xml, s, "aperture", -1); + item->metadata_fake_focal_length = xml_file_get_node_attribute_double (xml, s, "focal_length", -1); + /* TODO: add support for lens name */ + g_free (s); s = g_strdup_printf ("/gallery/items/*[%d]/thumbnail", i + 1); s2 = xml_file_get_node_attribute (xml, s, "crop"); |
