Fix build breaks in contact
[profile/ivi/wrt-plugins-tizen.git] / src / platform / Tizen / Mediacontent / Mediacontent.cpp
index 56c1c84..0e145fe 100755 (executable)
@@ -198,7 +198,8 @@ void Mediacontent::readCommonDataFromMediaInfo(media_info_h info, MediacontentMe
                }
        }
 
-       if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_display_name(info, &tmpStr) )
+       if ( newMedia->getMediaType().compare("IMAGE") == 0 
+               && MEDIA_CONTENT_ERROR_NONE == media_info_get_display_name(info, &tmpStr) )
        {
                if (tmpStr)
                {
@@ -428,6 +429,17 @@ void Mediacontent::readVideoFromMediaInfo( media_info_h info, MediacontentVideo*
                                }
                        }
 
+                       if ( MEDIA_CONTENT_ERROR_NONE == video_meta_get_title(video, &tmpStr) )
+                       {
+                               if( tmpStr )
+                               {
+                                       newVideo->setDisplayName(tmpStr);
+                                       LogDebug(" Video Title. " << tmpStr);
+                                       free(tmpStr);
+                                       tmpStr = NULL;
+                               }
+                       }
+
                        if ( MEDIA_CONTENT_ERROR_NONE == video_meta_get_artist(video, &tmpStr) )
                        {       
                                if ( tmpStr)
@@ -532,6 +544,17 @@ void Mediacontent::readMusicFromMediaInfo( media_info_h info, MediacontentAudio*
                                }
                        }
 
+                       if ( MEDIA_CONTENT_ERROR_NONE == audio_meta_get_title(audio, &tmpStr) )
+                       {
+                               if (tmpStr)
+                               {
+                                       newAudio->setDisplayName(tmpStr);
+                                       LogDebug("Audio Title : " << tmpStr);
+                                       free(tmpStr);
+                                       tmpStr = NULL;
+                               }
+                       }
+
                        if ( MEDIA_CONTENT_ERROR_NONE == audio_meta_get_album(audio, &tmpStr) )
                        {
                                if (tmpStr)
@@ -845,8 +868,8 @@ void Mediacontent::OnRequestReceived(const IEventBrowseFolderPtr &eBrowse)
                                {       
                                        LogDebug("limit or offset");
                                        
-                                       int count = -1;
-                                       int offset = 0;
+                                       long count = -1;
+                                       long offset = 0;
                                        
                                        if ( eBrowse->getLimitIsSet() )
                                        {