summaryrefslogtreecommitdiff
path: root/items.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-12-31 19:29:50 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-12-31 19:29:50 +0100
commitdc66e451a966e5ab320451c87ad912a741a71d4e (patch)
treed6e002d12d895517481612b699e5eaecb39e4258 /items.c
parente57e8ac7b198cd02331f0b66c12c9166641d373b (diff)
downloadcataract-dc66e451a966e5ab320451c87ad912a741a71d4e.tar.xz
Use image title as meta description
Allow per-album meta tags
Diffstat (limited to 'items.c')
-rw-r--r--items.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/items.c b/items.c
index 97202f2..413630f 100644
--- a/items.c
+++ b/items.c
@@ -83,6 +83,9 @@ parse_album_xml (const char *filename, TAlbum *index)
index->portrait_height = xml_file_get_node_attribute_long (xml, "/gallery/general/images", "portrait_h", 0);
index->border_style = xml_file_get_node_attribute (xml, "/gallery/general/border", "style");
+ index->meta_author = xml_file_get_node_value (xml, "/gallery/general/meta/author/text()");
+ index->meta_description = xml_file_get_node_value (xml, "/gallery/general/meta/description/text()");
+ index->meta_keywords = xml_file_get_node_value (xml, "/gallery/general/meta/keywords/text()");
/* Section Items */
count = xml_file_node_get_children_count (xml, "/gallery/items/*");
@@ -221,6 +224,12 @@ free_album_data (TAlbum *album)
free (album->base_dir);
if (album->border_style)
free (album->border_style);
+ if (album->meta_author)
+ free (album->meta_author);
+ if (album->meta_description)
+ free (album->meta_description);
+ if (album->meta_keywords)
+ free (album->meta_keywords);
if (album->items) {
if (album->items->len > 0) {