Fix : Playlist have to be searched in case that the playlist name is a letter, too 53/13353/1
authorSeokpil Park <seokpil.park@samsung.com>
Tue, 1 Oct 2013 02:04:44 +0000 (11:04 +0900)
committerSeokpil Park <seokpil.park@samsung.com>
Wed, 4 Dec 2013 04:19:52 +0000 (13:19 +0900)
Change-Id: I6632602abfc96d1bf4818ec45181cdf56d19fa74
Signed-off-by: Seokpil Park <seokpil.park@samsung.com>
src/FCnt_PlayListImpl.cpp
src/FCnt_PlayListManagerImpl.cpp

index ec682e2..ea07601 100644 (file)
@@ -174,7 +174,7 @@ _PlayListImpl::CreateFilter(const Tizen::Base::String& playListName)const
 {
        std::unique_ptr<char[]> pInputCond;
        String inputCondition = L"PLAYLIST_NAME = ";
-       String nameExpr(playListName);
+       String nameExpr(L"");
        filter_h tempFilter = NULL;
 
        int ret = media_filter_create(&tempFilter);
@@ -184,6 +184,9 @@ _PlayListImpl::CreateFilter(const Tizen::Base::String& playListName)const
        std::unique_ptr<filter_s, FilterHandleDeleter> pFilterHandle(tempFilter);
        SysTryReturnResult(NID_CNT, pFilterHandle != null, E_OUT_OF_MEMORY, "pFilterHandle is null.");
 
+       r = nameExpr.Append(playListName);
+       SysTryReturnResult(NID_CNT, r == E_SUCCESS, r, "Failed to perform Append operation for nameExpr.");
+
        if (!nameExpr.IsEmpty())
        {
                r = nameExpr.Replace("\'", "''");
index 7f77486..f4884a3 100644 (file)
@@ -93,7 +93,7 @@ _PlayListManagerImpl::CreateFilter(const Tizen::Base::String& playListName) cons
        std::unique_ptr<char[]> pInputCond;
        filter_h tempFilter = NULL;
        String inputCondition = L"PLAYLIST_NAME = ";
-       String nameExpr(playListName);
+       String nameExpr(L"");
 
        int ret = media_filter_create(&tempFilter);
        result r = MapCoreErrorToNativeResult(ret);
@@ -102,9 +102,12 @@ _PlayListManagerImpl::CreateFilter(const Tizen::Base::String& playListName) cons
        std::unique_ptr<filter_s, FilterDeleter> pFilterHandle(tempFilter);
        SysTryReturnResult(NID_CNT, pFilterHandle != null, E_OUT_OF_MEMORY, "pFilterHandle is null.");
 
+       r = nameExpr.Append(playListName);
+       SysTryReturnResult(NID_CNT, r == E_SUCCESS, r, "Failed to perform Append operation for nameExpr.");
+
        if (!nameExpr.IsEmpty())
        {
-               r = nameExpr.Replace("\'", "''");
+               r = nameExpr.Replace(L"\'", L"''");
                SysTryReturnResult(NID_CNT, r == E_SUCCESS, r, "Failed to perform Replace operation for nameExpr.");
 
                r = nameExpr.Insert('\'', 0);