diff options
Diffstat (limited to 'items.c')
| -rw-r--r-- | items.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -101,6 +101,8 @@ parse_album_xml (const char *filename, TAlbum *index) item->width = xml_file_get_node_attribute_long (xml, s, "width", 0); item->height = xml_file_get_node_attribute_long (xml, s, "height", 0); item->border_style = xml_file_get_node_attribute (xml, s, "border"); + if (index->type == GALLERY_TYPE_ALBUM) + item->thumbnail = xml_file_get_node_attribute (xml, s, "thumbnail"); g_free (s); s = g_strdup_printf ("/gallery/items/item[%d]/title/text()", i + 1); @@ -111,9 +113,11 @@ parse_album_xml (const char *filename, TAlbum *index) item->title_description = xml_file_get_node_value (xml, s); g_free (s); - s = g_strdup_printf ("/gallery/items/item[%d]/thumbnail", i + 1); - item->thumbnail = xml_file_get_node_attribute (xml, s, "src"); - g_free (s); + if (index->type == GALLERY_TYPE_INDEX) { + s = g_strdup_printf ("/gallery/items/item[%d]/thumbnail", i + 1); + item->thumbnail = xml_file_get_node_attribute (xml, s, "src"); + g_free (s); + } s = g_strdup_printf ("/gallery/items/item[%d]/nofullsize", i + 1); item->nofullsize = (xml_file_get_node_present (xml, s) || item->path == NULL); |
