summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2018-12-01 12:22:26 +0100
committerLukasz Stanislawski <l.stanislaws@samsung.com>2018-12-03 08:50:27 +0100
commit00559e3812e9ec75058112320307fd1d5b15f1a5 (patch)
tree09772cd816ff266fac213ac86d86a5e2aeecbfd0
parent7a667bf4e6aaec1f7c85c6f68434626025e2a571 (diff)
downloadair_mediahub-00559e3812e9ec75058112320307fd1d5b15f1a5.tar.gz
air_mediahub-00559e3812e9ec75058112320307fd1d5b15f1a5.tar.bz2
air_mediahub-00559e3812e9ec75058112320307fd1d5b15f1a5.zip
Some functionalities become broken after removal of APIs. They will be restored in following patches. Change-Id: I4da3499a10e0648a3dcb276274063fd1abe9adf8
-rw-r--r--include/data/folderdata.h1
-rw-r--r--src/data/folderdata.c9
-rw-r--r--src/view/viewer.c72
3 files changed, 2 insertions, 80 deletions
diff --git a/include/data/folderdata.h b/include/data/folderdata.h
index 79a6894..6750dba 100644
--- a/include/data/folderdata.h
+++ b/include/data/folderdata.h
@@ -32,7 +32,6 @@ struct folder_info {
char *id;
char *name;
char *path;
- char *parent_id;
int count;
};
diff --git a/src/data/folderdata.c b/src/data/folderdata.c
index d956e59..5232eec 100644
--- a/src/data/folderdata.c
+++ b/src/data/folderdata.c
@@ -165,7 +165,6 @@ static void _destroy_folder_info(struct folder_info *fi)
free(fi->id);
free(fi->name);
free(fi->path);
- free(fi->parent_id);
free(fi);
}
@@ -245,12 +244,6 @@ static bool _get_each_folder_info(media_folder_h folder, void *data)
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");
@@ -362,6 +355,8 @@ static bool _get_folder_list(struct folderdata *fd, char **path)
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\"",
diff --git a/src/view/viewer.c b/src/view/viewer.c
index 43838be..4ab58ef 100644
--- a/src/view/viewer.c
+++ b/src/view/viewer.c
@@ -459,7 +459,6 @@ static void _set_played_position(struct _priv *priv)
app_media *am;
int position;
int duration;
- int r;
if (priv->viewer.cur != VIEWER_MOVIE)
return;
@@ -484,75 +483,6 @@ static void _set_played_position(struct _priv *priv)
/* 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);
}
@@ -1141,8 +1071,6 @@ static void _callback_photo(void *data, const char *ev)
} 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)) {