[UTC][media-content][Non-ACR][mobile/wearable/TV][TSAM-5511, Fix container TCT failed]
authorJiyong Min <jiyong.min@samsung.com>
Mon, 27 Jun 2016 07:35:49 +0000 (16:35 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Mon, 27 Jun 2016 23:30:48 +0000 (16:30 -0700)
The contents path of import playlist is not valid for each users and container.
So the contents path of imported playlist file is removed,
and it is added to export playlist file before import playlist file.

Change-Id: I308346e4c95b51fba5d7b475f862e5e0580370f1
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
src/utc/media-content/res/common_iot/temp.m3u
src/utc/media-content/res/mobile/temp.m3u
src/utc/media-content/res/tv/temp.m3u
src/utc/media-content/res/wearable/temp.m3u
src/utc/media-content/utc-media-playlist.c

index 88fa76b..8dae060 100755 (executable)
@@ -23,8 +23,6 @@
 #define TEST_SET_PLAYLIST_SUB_2 "test_playlist_234"
 #define TEST_SET_PLAYLIST_SUB_3 "test_playlist_345"
 
-#define TEST_PLAYLIST_CREATION_PATH "/opt/usr/media/sample.m3u"
-
 //& set: MediaPlaylist
 static const char *img_file = "image.jpg";
 static char *img_path = NULL;
@@ -1161,6 +1159,15 @@ int utc_media_playlist_import_from_file_p(void)
        media_playlist_h playlist;
        int playlist_id = 0;
 
+       ret = media_playlist_add_media(g_playlist, g_media_id);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_playlist_update_to_db(g_playlist);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_playlist_export_to_file(g_playlist, copy_path);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
        ret = media_playlist_import_from_file(copy_path, TEST_SET_PLAYLIST_SUB_3, &playlist);
 
        if(playlist != NULL)    {