launch media hub with recent media 57/45357/3
authorSoohye Shin <soohye.shin@samsung.com>
Wed, 5 Aug 2015 06:45:02 +0000 (15:45 +0900)
committerSoohye Shin <soohye.shin@samsung.com>
Wed, 5 Aug 2015 09:33:55 +0000 (18:33 +0900)
Change-Id: Ifa013c73b57c50f72381e0813b7f2397d8cfc6fe
Signed-off-by: Soohye Shin <soohye.shin@samsung.com>
include/defs.h
src/data/data_recent.c

index 560dae6..141dcb1 100644 (file)
 #define MESSAGE_DELETE_CONTENTS "If you delete this user, their data will also be deleted."
 #define MESSAGE_DISCARD_CONTENTS "Discard all entered data?<br> If you are out of this screen, data won't be saved"
 
-#define KEY_MEDIA "Recent"
+#define KEY_MEDIA "media_id"
 #define KEY_CHANNEL "service_id"
 
 #define PACKAGE_LIVETV "org.tizen.live-tv"
index a3cdb98..950b5d2 100644 (file)
@@ -51,10 +51,10 @@ static struct datamgr_item *_new_datamgr_item(char *title, char *thumb,
        di->action = ITEM_SELECT_ACTION_LAUNCH;
        if (subtitle)
                di->subtitle = strdup(subtitle);
-       if (key)
+       if (key && value) {
                di->key = strdup(key);
-       if (value)
-               di->value = strdup(value);
+               di->value= strdup(value);
+       }
 
        return di;
 }
@@ -192,7 +192,6 @@ static void _gallery_list_foreach(gpointer data, gpointer user_data)
        di = _new_datamgr_item(aminfo->title, aminfo->thumbnail_path, NULL,
                        PACKAGE_MEDIAHUB, KEY_MEDIA, rdata->id,
                        IMAGE_RECENT_ICON_GALLERY, 1);
-
        if (di)
                dm->list = eina_list_append(dm->list, di);
 
@@ -264,7 +263,6 @@ static void _movie_list_foreach(gpointer data, gpointer user_data)
        di = _new_datamgr_item(aminfo->title, aminfo->thumbnail_path,
                        dur ? dur : NULL, PACKAGE_MEDIAHUB, KEY_MEDIA,
                        rdata->id, IMAGE_RECENT_ICON_MOVIE, 1);
-
        if (di)
                dm->list = eina_list_append(dm->list, di);
 
@@ -314,7 +312,6 @@ static void _music_list_foreach(gpointer data, gpointer user_data)
        di = _new_datamgr_item(aminfo->title, aminfo->thumbnail_path,
                        aminfo->audio->artist, PACKAGE_MEDIAHUB, KEY_MEDIA,
                        rdata->id, IMAGE_RECENT_ICON_MUSIC, 1);
-
        if (di)
                dm->list = eina_list_append(dm->list, di);