diff options
author | Jehun Lim <jehun.lim@samsung.com> | 2015-12-17 17:30:38 +0900 |
---|---|---|
committer | Jehun Lim <jehun.lim@samsung.com> | 2015-12-17 17:32:04 +0900 |
commit | 96d3912f199a4217f51f18a8b34b8be4e7886496 (patch) | |
tree | a9646c90ef625897bb735b70d84da153c4950eaf | |
parent | be296b1a2cce3a2458ac05a680e295c9ab32a77f (diff) | |
download | air_mediahub-96d3912f199a4217f51f18a8b34b8be4e7886496.tar.gz air_mediahub-96d3912f199a4217f51f18a8b34b8be4e7886496.tar.bz2 air_mediahub-96d3912f199a4217f51f18a8b34b8be4e7886496.zip |
movie/music: update play info when there is no recent item
Change-Id: I02200843487b26edc6746da6e958ba0608ca4a01
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
-rw-r--r-- | src/layout/movie.c | 15 | ||||
-rw-r--r-- | src/layout/music.c | 15 |
2 files changed, 12 insertions, 18 deletions
diff --git a/src/layout/movie.c b/src/layout/movie.c index d5fb864..a70376c 100644 --- a/src/layout/movie.c +++ b/src/layout/movie.c @@ -457,6 +457,8 @@ static void _update_recent_item(struct _priv *priv, const char *id) if (!dmgr) return; + info = NULL; + list = dmgr->ops->get_list(dmgr->handle, E_LIST_MEDIA, NULL); if (id) @@ -464,15 +466,10 @@ static void _update_recent_item(struct _priv *priv, const char *id) else am = _get_recent_item(list); - if (!am) { - _ERR("failed to get app media"); - return; - } - - info = app_media_get_info(am); - if (!info) { - _ERR("failed to get app media info"); - return; + if (am) { + info = app_media_get_info(am); + if (!info) + _ERR("failed to get app media info"); } priv->recent_info = am; diff --git a/src/layout/music.c b/src/layout/music.c index d62c05b..a11324a 100644 --- a/src/layout/music.c +++ b/src/layout/music.c @@ -404,6 +404,8 @@ static void _update_playing_item(struct _priv *priv, const char *id) if (!dmgr) return; + info = NULL; + list = dmgr->ops->get_list(dmgr->handle, E_LIST_MEDIA, NULL); if (id) @@ -411,15 +413,10 @@ static void _update_playing_item(struct _priv *priv, const char *id) else am = _get_playing_item(list); - if (!am) { - _ERR("failed to get app media"); - return; - } - - info = app_media_get_info(am); - if (!info) { - _ERR("failed to get app media info"); - return; + if (am) { + info = app_media_get_info(am); + if (!info) + _ERR("failed to get app media info"); } priv->playing_info = am; |