Revert "Resolve music player issue TSIX-2911" 51/232151/1
authorAmritanshu Pandia <a.pandia1@samsung.com>
Tue, 28 Apr 2020 17:24:41 +0000 (17:24 +0000)
committerAmritanshu Pandia <a.pandia1@samsung.com>
Tue, 28 Apr 2020 17:24:41 +0000 (17:24 +0000)
This reverts commit ae8d072681a92af07c1085358748c4a60538682a.

Change-Id: Ied7ef409f7282c0103d1ba87205c0ed3e805c1b5

src/core/mp-setting-ctrl.c

index 6240092..28fdb78 100755 (executable)
@@ -676,7 +676,6 @@ 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) {
@@ -695,7 +694,7 @@ void mp_setting_remove_now_playing_shared_status(void)
        fprintf(fp, " \n");
 
        fclose(fp);
-#endif
+
        endfunc;
 }
 
@@ -889,7 +888,6 @@ 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;
@@ -951,7 +949,6 @@ int mp_setting_read_playing_status(char *uri, char *status)
        if (fp) {
                fclose(fp);
        }
-#endif
        return 0;
 }
 
@@ -959,7 +956,6 @@ 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();
@@ -988,7 +984,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);
@@ -1003,13 +999,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;
 }