-int _media_thumb_get_thumb_from_db(const char *origin_path,
- char *thumb_path,
- int max_length,
- int *need_update_db)
-{
- int err = MS_MEDIA_ERR_NONE;
-
- //err = minfo_get_thumb_path(mb_svc_handle, origin_path, thumb_path, max_length);
- err = _media_thumb_get_thumb_path_from_db(db_handle, origin_path, thumb_path, max_length);
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_warn("Original path doesn't exist in DB");
- return err;
- }
-
- if (strlen(thumb_path) == 0) {
- thumb_warn("thumb path doesn't exist in DB");
- *need_update_db = 1;
- return MS_MEDIA_ERR_INTERNAL;
- }
-
- thumb_dbg_slog("Thumb path in DB is %s", thumb_path);
-
- if (!g_file_test(thumb_path, G_FILE_TEST_EXISTS)) {
- thumb_warn("thumb path doesn't exist in file system");
- *need_update_db = 1;
- return MS_MEDIA_ERR_INTERNAL;
- } else {
- thumb_dbg("This thumb path already exist");
- }
-
- return MS_MEDIA_ERR_NONE;
-}
-