char *display_name; /*album name */
char *path; /*the full path of this folder */
int type; /*storage type */
- time_t mtime; /*modified time */
int count; /*the media count in this folder */
};
char *media_uuid; /*media uuid */
image_meta_h image_h; /*the handle of operating this image */
int orientation; /*the orientation of this image */
- char *burstshot_id; /*the tag of burst shot */
};
struct _gl_video_t {
Elm_Object_Item *f_it = elm_gengrid_first_item_get(ad->albuminfo.view);
gl_cluster *album_item = NULL;
Eina_List *list = NULL;
- int i = 1, ret;
+ int i = 1;
if (f_it) {
album_item = elm_object_item_data_get(f_it);
if (album_item && album_item->cluster) {
list = eina_list_append(list, album_item);
- media_folder_set_order(album_item->cluster->folder_h, i);
- media_folder_update_to_db(album_item->cluster->folder_h);
i++;
album_item = NULL;
}
album_item = elm_object_item_data_get(f_it);
if (album_item && album_item->cluster) {
list = eina_list_append(list, album_item);
- ret = media_folder_set_order(album_item->cluster->folder_h, i);
- ret = media_folder_update_to_db(album_item->cluster->folder_h);
i++;
album_item = NULL;
}
/* Check the first item of previous appending, maybe it's a burst item */
gitem = eina_list_nth(media_elist, i - 1);
- if (gitem && gitem->item &&
- gitem->item->type == MEDIA_CONTENT_TYPE_IMAGE &&
- gitem->item->image_info && gitem->item->image_info->burstshot_id) {
- burstshot_id = gitem->item->image_info->burstshot_id;
- gl_dbgW("Update burstshot item!");
- elm_gengrid_item_update(gitem->elm_item);
- }
gitem = NULL;
for (; i < cnt; i++) {
gitem = eina_list_nth(media_elist, i);
GL_CHECK_FALSE(burstshot_id);
bool b_to_append = false;
- if (gitem->item->type == MEDIA_CONTENT_TYPE_IMAGE &&
- gitem->item->image_info && gitem->item->image_info->burstshot_id) {
- /* First birstshot item, two jacent birstshot items */
- if (*burstshot_id == NULL ||
- g_strcmp0(*burstshot_id,
- gitem->item->image_info->burstshot_id)) {
- *burstshot_id = gitem->item->image_info->burstshot_id;
- b_to_append = true;
- }
- } else {
- /* Normal item(not burstshot) */
- b_to_append = true;
- *burstshot_id = NULL;
- }
+ /* Normal item(not burstshot) */
+ b_to_append = true;
+ *burstshot_id = NULL;
return b_to_append;
}
}
gitem = elm_object_item_data_get(it);
- if (gitem && gitem->item && gitem->item->image_info &&
- gitem->item->image_info->burstshot_id) {
+ if (gitem && gitem->item && gitem->item->image_info) {
/* Realize burstshot item again */
elm_gengrid_item_update(it);
}
image_meta_destroy(tmp_item->image_info->image_h);
tmp_item->image_info->image_h = NULL;
}
- GL_FREEIF(tmp_item->image_info->burstshot_id);
GL_FREEIF(tmp_item->image_info->media_uuid);
GL_FREE(tmp_item->image_info);
} else if (MEDIA_CONTENT_TYPE_VIDEO == tmp_item->type &&
/* Get all contents(including local and cloud) for albums list */
g_strlcpy(filter.cond, GL_CONDITION_IMAGE_VIDEO, CONDITION_LENGTH);
filter.sort_type = MEDIA_CONTENT_ORDER_ASC;
- if (ad->maininfo.reorder) {
- g_strlcpy(filter.sort_keyword, FOLDER_ORDER, KEYWORD_LENGTH);
- } else {
- g_strlcpy(filter.sort_keyword, FOLDER_NAME, KEYWORD_LENGTH);
- }
+ g_strlcpy(filter.sort_keyword, FOLDER_NAME, KEYWORD_LENGTH);
+
filter.collate_type = MEDIA_CONTENT_COLLATE_NOCASE;
filter.offset = GL_GET_ALL_RECORDS;
filter.count = GL_GET_ALL_RECORDS;
gl_item *current = NULL;
Eina_List *l = NULL;
bool b_removed = false;
- char *burstshot_id = NULL;
- if (gitem->item->type == MEDIA_CONTENT_TYPE_IMAGE &&
- gitem->item->image_info) {
- burstshot_id = gitem->item->image_info->burstshot_id;
- }
EINA_LIST_FOREACH(ad->selinfo.elist, l, current) {
if (current == NULL || current->item == NULL ||
continue;
}
if (!g_strcmp0(current->item->uuid, gitem->item->uuid) ||
- (burstshot_id &&
- current->item->type == MEDIA_CONTENT_TYPE_IMAGE &&
- current->item->image_info &&
- current->item->image_info->burstshot_id &&
- !g_strcmp0(burstshot_id,
- current->item->image_info->burstshot_id))) {
+ (current->item->type == MEDIA_CONTENT_TYPE_IMAGE)) {
if (gitem->item->storage_type != GL_STORE_T_PHONE) {
ad->selinfo.disable_hide_cnt--;
}
/* Update selected images count */
if (current->item->type == MEDIA_CONTENT_TYPE_IMAGE &&
- ad->selinfo.images_cnt > 0) {
+ ad->selinfo.images_cnt > 0) {
ad->selinfo.images_cnt--;
}
ad->selinfo.elist = eina_list_remove(ad->selinfo.elist,
- current);
- if (burstshot_id == NULL) {
- break;
- } else {
- current->checked = gitem->checked;
- b_removed = true;
- }
+ current);
+ current->checked = gitem->checked;
+ b_removed = true;
} else if (b_removed) {
/* Already removed and not more items, quit */
break;
goto GL_LOCAL_FAILED;
}
- if (media_folder_get_modified_time(folder, &(album->mtime)) !=
- MEDIA_CONTENT_ERROR_NONE) {
- gl_dbgE("Get modified time failed!");
- goto GL_LOCAL_FAILED;
- }
-
if (media_folder_get_name(folder, &(album->display_name)) !=
MEDIA_CONTENT_ERROR_NONE) {
gl_dbgE("Get folder name failed!");
gl_dbgE("Get image orientation failed!");
goto GL_LOCAL_FAILED;
}
- if (image_meta_get_burst_id
- (image_handle,
- &(image_info->burstshot_id)) != MEDIA_CONTENT_ERROR_NONE) {
- image_info->burstshot_id = NULL;
- gl_dbgE("Get burstshot_id failed!");
- }
if (image_meta_destroy(image_handle) != MEDIA_CONTENT_ERROR_NONE) {
gl_dbgE("Destroy image handle failed!");