data->view_by = IVUG_VIEW_BY_INVAILD;
}
+ media_handle file_handle = ivug_db_get_file_handle(data->filepath);
+ if(file_handle == NULL)
+ {
+ MSG_IVUG_ERROR("Current File = %s is not in DB", data->filepath);
+ data->view_by = IVUG_VIEW_BY_FILE;
+ }
+
//parse image index at album
char* val = NULL;
**********************************
*/
// Get album id from file path.
- media_handle m_handle = ivug_db_get_folder_handle(ecore_file_dir_get(data->filepath));
- if(m_handle == NULL)
- {
- MSG_IVUG_ERROR("View by Folder. but media handle is NULL" );
- ivug_param_delete(data);
- return NULL;
- }
+ char *dir = ivug_get_directory(data->filepath);
+ media_handle m_handle = ivug_db_get_folder_handle(dir);
+ free(dir);
- data->album_id = ivug_db_get_folder_id(m_handle);
+ if(data->album_id == INVALID_UUID)
+ {
+ if(m_handle == NULL)
+ {
+ MSG_IVUG_ERROR("View by Folder. but media handle is NULL" );
+ //ivug_param_delete(data);
+ //return NULL;
+ data->view_by = IVUG_VIEW_BY_DIRECTORY; // check manually
+ }
+ else
+ {
+ data->album_id = ivug_db_get_folder_id(m_handle);
- ivug_db_destroy_folder_handle(m_handle);
+ ivug_db_destroy_folder_handle(m_handle);
- MSG_IVUG_HIGH("Get Album ID(%s) from file %s", uuid_getchar(data->album_id), data->filepath);
+ MSG_IVUG_HIGH("Get Album ID(%s) from file %s", uuid_getchar(data->album_id), data->filepath);
+ }
+ }
}
service_get_extra_data (service, IVUG_BUNDLE_KEY_MEDIA_TYPE, &val);
IV_ASSERT(filter_str != NULL);
media_handle handle = NULL;
+ char *dir = NULL;
if ( param->view_by == IVUG_VIEW_BY_DIRECTORY )
{
case IVUG_VIEW_BY_FOLDER:
if(param->album_id == NULL)
{
- handle = ivug_db_get_folder_handle(ecore_file_dir_get(param->filepath));
+ dir = ivug_get_directory(param->filepath);
+ handle = ivug_db_get_folder_handle(dir);
filter->album_id = ivug_db_get_folder_id(handle);
+ free(dir);
}
else
{
if ( _mList->count == 0 )
{
- MSG_SDATA_FATAL("No file founded");
+ MSG_SDATA_ERROR("No file founded");
return NULL;
}
_mList->count = ivug_list_get_item_cnt(filter);
if ( _mList->count == 0 )
{
- MSG_SDATA_FATAL("No file founded");
+ MSG_SDATA_ERROR("No file founded");
return NULL;
}
PERF_CHECK_BEGIN(LVL3, "MediaList - load all block");