Resolve music player issue TSIX-2911 34/232134/1 submit/tizen/20200428.123012
authorAmritanshu <a.pandia1@samsung.com>
Tue, 28 Apr 2020 11:46:13 +0000 (17:16 +0530)
committerAmritanshu <a.pandia1@samsung.com>
Tue, 28 Apr 2020 11:46:13 +0000 (17:16 +0530)
Change-Id: Ie6af7cdb59766c093ff7f89d4cd17979eee0b9ad
Signed-off-by: Amritanshu <a.pandia1@samsung.com>
src/core/mp-setting-ctrl.c

index 28fdb78..6240092 100755 (executable)
@@ -676,6 +676,7 @@ void mp_setting_save_playing_info(void *data)
 void mp_setting_remove_now_playing_shared_status(void)
 {
        startfunc;
+#ifndef MP_SOUND_PLAYER
        char *path = app_get_data_path();
        char playing_status[1024] = { 0 };
        if (path == NULL) {
@@ -694,7 +695,7 @@ void mp_setting_remove_now_playing_shared_status(void)
        fprintf(fp, " \n");
 
        fclose(fp);
-
+#endif
        endfunc;
 }
 
@@ -888,6 +889,7 @@ int mp_setting_read_playing_status(char *uri, char *status)
        char str[1000] = { 0, };
        int valid_uri = 0;
        int valid_status = 0;
+#ifndef MP_SOUND_PLAYER
        char *path = app_get_data_path();
        if (!path) {
                return -1;
@@ -949,6 +951,7 @@ int mp_setting_read_playing_status(char *uri, char *status)
        if (fp) {
                fclose(fp);
        }
+#endif
        return 0;
 }
 
@@ -956,6 +959,7 @@ void mp_setting_write_playing_status(char *uri, char *status)
 {
        startfunc;
        int count = 0;
+#ifndef MP_SOUND_PLAYER
        mp_media_info_list_count(MP_TRACK_ALL, NULL, NULL, NULL, 0, &count);
        if (count <= 0) {
                mp_setting_remove_now_playing_shared_status();
@@ -984,7 +988,7 @@ void mp_setting_write_playing_status(char *uri, char *status)
                fprintf(fp, "#Nowplaying\n");
                fprintf(fp, "uri=%s\n", uri);
                fprintf(fp, "status=%s\n", status);
-#ifndef MP_SOUND_PLAYER
+//#ifndef MP_SOUND_PLAYER
                struct appdata *ad = mp_util_get_appdata();
                if (ad && ad->current_track_info) {
                        fprintf(fp, "title=%s\n", ad->current_track_info->title);
@@ -999,13 +1003,13 @@ void mp_setting_write_playing_status(char *uri, char *status)
                                                shared_path);
                        }
                }
-#endif
+//#endif
 
                fprintf(fp, "changePlayer=%s\n", "false");
                fsync((int) fp);
                fclose(fp);
        }
-
+#endif
        endfunc;
 }