diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-03-07 15:12:50 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-03-07 15:12:50 +0100 |
| commit | 895513e06150927cf5db6600ca164bdae15d4d75 (patch) | |
| tree | ff678c88754cfb6b966a463b04480665fdbf7504 /src/items.c | |
| parent | aaeb9af232372ea8001fe9e71faf100f4fd34886 (diff) | |
| download | cataract-895513e06150927cf5db6600ca164bdae15d4d75.tar.xz | |
Support for extra (enclosed) files in albums [code]
Diffstat (limited to 'src/items.c')
| -rw-r--r-- | src/items.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/items.c b/src/items.c index 986fd6c..5cce7c3 100644 --- a/src/items.c +++ b/src/items.c @@ -75,6 +75,12 @@ parse_album_xml (const char *filename, TAlbum *index) index->title = xml_file_get_node_value (xml, "/gallery/general/title/text()"); index->desc = xml_file_get_node_value (xml, "/gallery/general/description/text()"); index->footnote = xml_file_get_node_value (xml, "/gallery/general/footnote/text()"); + s = xml_file_get_node_value (xml, "/gallery/general/extra_files/text()"); + if (s) { + index->extra_files = g_strsplit (s, "\n", -1); + free (s); + } + index->quality = xml_file_get_node_attribute_long (xml, "/gallery/general/images", "quality", -1); index->landscape_width = xml_file_get_node_attribute_long (xml, "/gallery/general/images", "landscape_w", 0); @@ -237,6 +243,8 @@ free_album_data (TAlbum *album) free (album->meta_description); if (album->meta_keywords) free (album->meta_keywords); + if (album->extra_files) + g_strfreev (album->extra_files); if (album->items) { if (album->items->len > 0) { |
