summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinwoo.shin <jw0227.shin@samsung.com>2015-07-30 16:23:22 +0900
committerjinwoo.shin <jw0227.shin@samsung.com>2015-07-30 16:23:22 +0900
commit483bf077efe0370b7804559b1f0c31609747557b (patch)
treebcfe0ccfd7c7da9cb204628937883acd45c312fe
parent72e71c2d3332bd554f4a664f593b50344bd8ca3f (diff)
downloadair_livetv-483bf077efe0370b7804559b1f0c31609747557b.tar.gz
air_livetv-483bf077efe0370b7804559b1f0c31609747557b.tar.bz2
air_livetv-483bf077efe0370b7804559b1f0c31609747557b.zip
Change-Id: I3205f79b3df2bb73d4cb9fd801dd861e663b7e21 Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
-rw-r--r--include/define.h2
-rw-r--r--src/layout_channelinfo_list.c2
-rw-r--r--src/tv.c1
-rw-r--r--src/view_channelinfo.c19
4 files changed, 18 insertions, 6 deletions
diff --git a/include/define.h b/include/define.h
index 94c2c4b..ed6f92c 100644
--- a/include/define.h
+++ b/include/define.h
@@ -19,7 +19,7 @@
#include "strings.h"
-#define KEY_SVCID "svcid"
+#define KEY_SVCID "service_id"
#define PART_CONTENT "elm.swallow.content"
#define PART_TEXT "elm.text"
diff --git a/src/layout_channelinfo_list.c b/src/layout_channelinfo_list.c
index a6ab0b9..89d71ff 100644
--- a/src/layout_channelinfo_list.c
+++ b/src/layout_channelinfo_list.c
@@ -306,6 +306,8 @@ static void _update(void *layout_data, int type, void *data)
priv->channel_info->service_id);
if (r < 0)
_ERR("failed to tune next channel");
+
+ _update_channel_info(priv);
}
}
}
diff --git a/src/tv.c b/src/tv.c
index b0da082..9685aa2 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -335,6 +335,7 @@ int tv_epg_get_program(int service_id, struct tv_program_request *request)
(TvServiceEpgCallback) _tv_epg_event_cb, request);
if (r != TVS_ERROR_OK) {
_ERR("failed to get epg get current program : %d", service_id);
+ free(request);
return -1;
}
diff --git a/src/view_channelinfo.c b/src/view_channelinfo.c
index 0bd6426..14e2960 100644
--- a/src/view_channelinfo.c
+++ b/src/view_channelinfo.c
@@ -201,7 +201,11 @@ static void _load_program_info(Evas_Object *obj,
const struct tv_program_info *prog)
{
char buf[BUF_MAX];
- int r;
+ int r, service_id;
+
+ service_id = evas_object_data_get(obj, KEY_SVCID);
+ if (service_id != prog->service_id)
+ return;
if (prog->start_time && prog->end_time) {
r = _get_program_time(buf, sizeof(buf),
@@ -261,16 +265,21 @@ void draw_channel_info(Evas_Object *obj,
_load_channel_text(obj, channel_info);
_set_icon_box(obj, channel_info);
+ evas_object_data_set(obj, KEY_SVCID, channel_info->service_id);
prog_req = calloc(1, sizeof(*prog_req));
prog_req->tv_program_cb = _tv_program_cb;
prog_req->user_data = obj;
- if (channel_info->service_id == current_service)
+ r = tv_epg_get_cache_program(channel_info->service_id,
+ prog_req);
+
+ if (channel_info->service_id == current_service) {
+ prog_req = calloc(1, sizeof(*prog_req));
+ prog_req->tv_program_cb = _tv_program_cb;
+ prog_req->user_data = obj;
r = tv_epg_get_program(channel_info->service_id, prog_req);
- else
- r = tv_epg_get_cache_program(channel_info->service_id,
- prog_req);
+ }
if (r < 0)
viewmgr_update_view(VIEW_CHANNELINFO,