endfunc;
}
- if (ad->playlist_mgr->shuffle_state) {
- ad->playlist_mgr->list = ad->playlist_mgr->shuffle_list;
- } else {
- ad->playlist_mgr->list = ad->playlist_mgr->normal_list;
+
+void mp_common_play_track_list_with_song_uid(mp_list_item_data_t* item, Evas_Object *genlist,
+ char *item_uid, char *item_uri)
+{
+ startfunc;
+ MP_CHECK(item);
+ MP_CHECK(item_uid);
+ MP_CHECK(item_uri);
+
+ struct appdata *ad = mp_util_get_appdata();
+ MP_CHECK(ad);
+
+ ad->hide_player_view = true;
+ ad->paused_by_user = false;
+
+ if (!ad->playlist_mgr) {
+ mp_common_create_playlist_mgr();
+ }
+
+ PROFILE_IN("mp_playlist_mgr_clear");
+ mp_playlist_mgr_clear(ad->playlist_mgr);
+ PROFILE_OUT("mp_playlist_mgr_clear");
+
+ Elm_Object_Item *gli2 = NULL;
+ mp_plst_item* plst_item = NULL;
+ gli2 = elm_genlist_first_item_get(genlist);
+ while (gli2) {
+ if (elm_genlist_item_select_mode_get(gli2) !=
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) {
+ mp_list_item_data_t *item_data =
+ elm_object_item_data_get(gli2);
+ if (item_data
+ && item_data->item_type == MP_LIST_ITEM_TYPE_NORMAL) {
+ if (item_data->group_type == MP_GROUP_NONE
+ || item_data->group_type == MP_GROUP_BY_ALLSHARE) {
+ char *uri = NULL;
+ char *uid = NULL;
+ char *title = NULL;
+ char *artist = NULL;
+
+ mp_track_type track_type = MP_TRACK_URI;
+ mp_media_info_get_media_id(item_data->handle, &uid);
+ if (g_strcmp0(item_uid, uid)) {
+ gli2 = elm_genlist_item_next_get(gli2);
+ continue;
+ }
+ mp_media_info_get_file_path(item_data->handle, &uri);
+ mp_media_info_get_title(item_data->handle, &title);
+ mp_media_info_get_artist(item_data->handle, &artist);
+
+ mp_storage_type_e storage;
+ mp_media_info_get_storage_type(item_data->handle,
+ &storage);
+
+ plst_item =
+ mp_playlist_mgr_item_append(ad->playlist_mgr, uri,
+ uid, title, artist,
+ track_type);
+ }
+ }
+ }
+ gli2 = elm_genlist_item_next_get(gli2);
+ }
+
-
++ if (ad->playlist_mgr) {
++ if (ad->playlist_mgr->shuffle_state) {
++ ad->playlist_mgr->list = ad->playlist_mgr->shuffle_list;
++ } else {
++ ad->playlist_mgr->list = ad->playlist_mgr->normal_list;
++ }
+ }
+ mp_playlist_mgr_set_current(ad->playlist_mgr, plst_item);
+
+ PROFILE_IN("mp_play_destory");
+ mp_play_fast_destory(ad);
+ PROFILE_OUT("mp_play_destory");
+
+ mp_play_new_file(ad, TRUE);
+}
+
+ /*
+ * Play the songs with playlist id
+ * @param item Music Player list item
+ * @param genlist Genlist item
+ * @param playlist_id Playlist id
+ * @return void
+ */
void mp_common_play_track_list_with_playlist_id(mp_list_item_data_t * item,
Evas_Object * genlist,
int playlist_id)
if (!strcmp(APP_CONTROL_OPERATION_VIEW, operation)) {
struct appdata *ad = mp_util_get_appdata();
+ MP_CHECK_FALSE(ad);
char *value = NULL;
+ if (!ad) {
+ ERROR_TRACE("Appdata is NULL");
+ goto END;
+ }
ad->samsung_link = false;