From: Jaroslav Kysela Date: Fri, 30 Nov 2018 07:58:18 +0000 (+0100) Subject: imagecache: fix 'accessed' field loading and the default value, issue #4304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=219ba145f82926e972f476debad8be6664782307;p=thirdparty%2Ftvheadend.git imagecache: fix 'accessed' field loading and the default value, issue #4304 --- diff --git a/src/imagecache.c b/src/imagecache.c index 937e24bce..ea41d939d 100644 --- a/src/imagecache.c +++ b/src/imagecache.c @@ -445,10 +445,11 @@ imagecache_init ( void ) if (!(e = htsmsg_get_map_by_field(f))) continue; if (!(id = atoi(htsmsg_field_name(f)))) continue; if (!(url = htsmsg_get_str(e, "url"))) continue; - img = calloc(1, sizeof(imagecache_image_t)); - img->id = id; - img->url = strdup(url); - img->updated = htsmsg_get_s64_or_default(e, "updated", 0); + img = calloc(1, sizeof(imagecache_image_t)); + img->id = id; + img->url = strdup(url); + img->accessed = htsmsg_get_s64_or_default(e, "accessed", gclk()); + img->updated = htsmsg_get_s64_or_default(e, "updated", 0); sha1 = htsmsg_get_str(e, "sha1"); if (sha1 && strlen(sha1) == 40) hex2bin(img->sha1, 20, sha1);