summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehun Lim <jehun.lim@samsung.com>2015-12-18 05:50:40 (GMT)
committerJehun Lim <jehun.lim@samsung.com>2015-12-18 05:50:40 (GMT)
commit87d32bea6beb7dd98ddcd6b8ae5369fe999fb692 (patch)
tree249b1837a1385f8796f0c0f741ee3987eafabf6d
parenta9591cec606bf84f44f62913a795e2cf5d3e4cab (diff)
downloadair_mediahub-87d32bea6beb7dd98ddcd6b8ae5369fe999fb692.zip
air_mediahub-87d32bea6beb7dd98ddcd6b8ae5369fe999fb692.tar.gz
air_mediahub-87d32bea6beb7dd98ddcd6b8ae5369fe999fb692.tar.bz2
music: update now playing item referring to player statusrefs/changes/23/54823/1
Change-Id: Ic92fc3fdd0bc903b6a6ee3caa5dcd16bc7f64178 Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
-rw-r--r--src/layout/music.c18
-rw-r--r--src/view/base.c1
2 files changed, 19 insertions, 0 deletions
diff --git a/src/layout/music.c b/src/layout/music.c
index a11324a..4234f9b 100644
--- a/src/layout/music.c
+++ b/src/layout/music.c
@@ -62,6 +62,8 @@ struct _priv {
int view_mode;
int source_type;
+ int status;
+
struct grid_data *gdata;
};
@@ -400,6 +402,11 @@ static void _update_playing_item(struct _priv *priv, const char *id)
app_media_info *info;
struct datamgr *dmgr;
+ if (priv->status == E_PLAYER_STOP) {
+ listmgr_update_play_info(priv->listmgr, NULL);
+ return;
+ }
+
dmgr = priv->dmgr[E_DATA_MEDIA];
if (!dmgr)
return;
@@ -649,6 +656,17 @@ static void _update(void *layout_data, int update_type, void *data)
_update_playing_item(priv, vdata->id);
break;
+ case UPDATE_PLAYER:
+ if (!data) {
+ _ERR("invalid argument");
+ return;
+ }
+
+ vdata = data;
+
+ priv->status = vdata->status;
+ _update_playing_item(priv, NULL);
+ break;
case UPDATE_FOCUS:
listmgr_focus_play_info(priv->listmgr);
break;
diff --git a/src/view/base.c b/src/view/base.c
index b318011..0a53ee0 100644
--- a/src/view/base.c
+++ b/src/view/base.c
@@ -968,6 +968,7 @@ static void _update(void *view_data, int update_type, void *data)
switch (update_type) {
case UPDATE_FOCUS:
case UPDATE_PLAY_INFO:
+ case UPDATE_PLAYER:
if (!data)
goto err;