free(fi->id);
free(fi->name);
free(fi->path);
- free(fi->parent_id);
free(fi);
}
goto err;
}
- if (media_folder_get_parent_folder_id(folder, &(fi->parent_id))
- != MEDIA_CONTENT_ERROR_NONE) {
- _ERR("failed to fetch parent folder id");
- goto err;
- }
-
if (media_folder_get_media_count_from_db(fi->id, filter, &(fi->count))
!= MEDIA_CONTENT_ERROR_NONE) {
_ERR("failed to get media count");
return false;
}
+ //FIXME change a method of loading subfolder
+ //due to deprecation of FOLDER_PARENT_FOLDER_ID
if (strlen(buf)) {
snprintf(s, sizeof(s),
" OR FOLDER_PARENT_FOLDER_ID=\"%s\"",
app_media *am;
int position;
int duration;
- int r;
if (priv->viewer.cur != VIEWER_MOVIE)
return;
/* TIZEN doesn't suppport function for storing played postion anymore */
- r = video_meta_update_to_db(video);
- if (r != MEDIA_CONTENT_ERROR_NONE) {
- _ERR("failed to update db");
- return;
- }
-
- app_media_update(am);
-}
-
-static void _set_image_orientation(struct _priv *priv)
-{
- app_media *am;
- app_media_info *mi;
- image_meta_h image;
- media_content_orientation_e orient;
- int r;
-
- if (priv->viewer.cur != VIEWER_PHOTO)
- return;
-
- am = eina_list_nth(priv->playlist.list, priv->playlist.cur);
- if (!am) {
- _ERR("failed to get app_media");
- return;
- }
-
- mi = _get_current_media_info(priv);
- if (!mi) {
- _ERR("failed to getting media info");
- return;
- }
-
- image = app_media_get_image_handle(am);
- if (!image) {
- _ERR("failed to getting image handle");
- return;
- }
-
- switch (mi->image->orientation) {
- case MEDIA_CONTENT_ORIENTATION_NORMAL:
- case MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE:
- orient = MEDIA_CONTENT_ORIENTATION_ROT_270;
- break;
- case MEDIA_CONTENT_ORIENTATION_ROT_90:
- orient = MEDIA_CONTENT_ORIENTATION_NORMAL;
- break;
- case MEDIA_CONTENT_ORIENTATION_ROT_180:
- orient = MEDIA_CONTENT_ORIENTATION_ROT_90;
- break;
- case MEDIA_CONTENT_ORIENTATION_ROT_270:
- orient = MEDIA_CONTENT_ORIENTATION_ROT_180;
- break;
- default:
- orient = MEDIA_CONTENT_ORIENTATION_NORMAL;
- break;
- }
-
- r = image_meta_set_orientation(image, orient);
- if (r != MEDIA_CONTENT_ERROR_NONE) {
- _ERR("failed to set played position");
- return;
- }
-
- r = image_meta_update_to_db(image);
- if (r != MEDIA_CONTENT_ERROR_NONE) {
- _ERR("failed to update db");
- return;
- }
-
app_media_update(am);
}
} else if (!strcmp(ev, SRC_BTN_GALLERY_NEXT)) {
_viewer_next(priv);
} else if (!strcmp(ev, SRC_BTN_ROTATE)) {
- _set_image_orientation(priv);
-
priv->viewer.foc = BTN_LOC_ROTATE;
_viewer_show(priv);
} else if (!strcmp(ev, SRC_BTN_ZOOM)) {