summaryrefslogtreecommitdiff
path: root/src/media-thumb-internal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/media-thumb-internal.c')
-rwxr-xr-xsrc/media-thumb-internal.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index 63aeb11..44b9d88 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -23,6 +23,7 @@
#include "media-thumb-util.h"
#include "media-thumb-internal.h"
#include "media-thumb-ipc.h"
+#include "media-thumb-db.h"
#include <sys/types.h>
#include <fcntl.h>
@@ -331,6 +332,7 @@ int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path
char *hash_name = NULL;
char file_ext[255] = { 0 };
char *get_path = NULL;
+ char *storage_id = NULL;
int ret_len = 0;
ms_user_storage_type_e storage_type = -1;
int ret = MS_MEDIA_ERR_NONE;
@@ -353,8 +355,14 @@ int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path
thumb_err("_media_thumb_generate_hash_name fail");
return MS_MEDIA_ERR_INTERNAL;
}
+ ret = _media_thumb_get_storage_id_from_db(file_full_path, &storage_id, uid);
+ if (ret != MS_MEDIA_ERR_NONE) {
+ thumb_err("_media_thumb_get_storage_id_from_db fail");
+ return MS_MEDIA_ERR_INTERNAL;
+ }
- ret = ms_user_get_thumb_store_path(uid, storage_type, &get_path);
+ ret = ms_user_get_thumb_store_path(uid, storage_type, storage_id, &get_path);
+ SAFE_FREE(storage_id);
if (get_path != NULL)
ret_len = snprintf(thumb_hash_path, max_thumb_path - 1, "%s/.%s-%s.jpg", get_path, file_ext, hash_name);