[Title] Fix not working findItem function.
[Issue] N_SE-1229, N_SE-7294, N_SE-7296
[Problem] when the title search, the search results not.
[Cause] The Image Type, title column is empty.
[Solution] including file name condition to the sql statement.
[SCMRequest] N/A
Test Done.
Signed-off-by: Dongjin Choi <milkelf.choi@samsung.com>
}
- void setLimit(const unsigned long value)
+ void setLimit(const long value)
{
m_limitIsSet = true;
m_limit = value;
}
- void setOffset(const unsigned long value)
+ void setOffset(const long value)
{
m_offsetIsSet = true;
m_offset = value;
return m_sortModesIsSet;
}
- unsigned long getLimit() const
+ long getLimit() const
{
return m_limit;
}
- unsigned long getOffset() const
+ long getOffset() const
{
return m_offset;
}
bool m_offsetIsSet;
bool m_folderIdIsSet;
- unsigned long m_limit;
- unsigned long m_offset;
+ long m_limit;
+ long m_offset;
FilterPtr m_filter;
SortModeArrayPtr m_sortModes;
SortModePtr m_sortMode;
m_editableAttrList.push_back("rating");
m_editableAttrList.push_back("playedTime");
m_editableAttrList.push_back("playCount");
- m_editableAttrList.push_back("album");
- m_editableAttrList.push_back("genres");
- m_editableAttrList.push_back("artists");
- m_editableAttrList.push_back("composers");
+ m_editableAttrList.push_back("title");
+ m_editableAttrList.push_back("description");
}
MediacontentAudio::~MediacontentAudio()
{
LogDebug("enter");
m_editableAttrList.push_back("rating");
+ m_editableAttrList.push_back("description");
}
MediacontentImage::~MediacontentImage()
m_isChangedPlayCount = false;
m_isChangedPlayedTime = false;
+ m_editableAttrList.push_back("title");
m_editableAttrList.push_back("rating");
m_editableAttrList.push_back("playedTime");
m_editableAttrList.push_back("playCount");
- m_editableAttrList.push_back("geolocation");
- m_editableAttrList.push_back("album");
- m_editableAttrList.push_back("artists");
-
+ m_editableAttrList.push_back("description");
+ m_editableAttrList.push_back("orientation");
}
MediacontentVideo::~MediacontentVideo()
}
operatorStr = operatorKey[cond];
+ if (attrName.compare("MEDIA_TITLE")==0)
+ {
+ string imageCond = STR_LEFT_BRACKET;
+ imageCond += STR_LEFT_BRACKET + " MEDIA_TYPE=0 " + STR_RIGHT_BRACKET;
+ imageCond += STR_AND + " MEDIA_DISPLAY_NAME " + operatorStr + valueStr;
+ imageCond += STR_RIGHT_BRACKET;
+
+ string videoNAudioCond = STR_LEFT_BRACKET;
+ videoNAudioCond += STR_LEFT_BRACKET + "MEDIA_TYPE=1 " + STR_OR + " MEDIA_TYPE=3" + STR_RIGHT_BRACKET;
+ videoNAudioCond += STR_AND + " MEDIA_TITLE " + operatorStr + valueStr;
+ videoNAudioCond += STR_RIGHT_BRACKET;
+
+ conditionStr = STR_LEFT_BRACKET + imageCond + STR_OR + videoNAudioCond + STR_RIGHT_BRACKET;
+ }
+ else
+ {
conditionStr = STR_LEFT_BRACKET + attrName + operatorStr + valueStr + STR_RIGHT_BRACKET;
+ }
return conditionStr;
}
}
}
- 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)
{
}
}
+ 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)
}
}
+ 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)
{
LogDebug("limit or offset");
- int count = -1;
- int offset = 0;
+ long count = -1;
+ long offset = 0;
if ( eBrowse->getLimitIsSet() )
{
rating = 0;
LogDebug("Rating value set 0 as inserted value is too small");
}
- else if(rating > 10)
- {
- rating = 10;
- LogDebug("Rating value set 10 as inserted value is too big");
- }
+
if ( objMedia->getRating() != rating)
{
{
long count = filterConverter->toLong(arguments[5]);
- if(count > 0.0)
+ if(count > 0)
{
dplEvent->setLimit(count);
}
- else if ( count == 0.0)
+ else if ( count == 0)
{
- dplEvent->setLimit(-1);
+ dplEvent->setLimit(-1); // -1 is all row.
}
else
{
if(argumentCount >= 7) //optional unsigned long? offset
{
long offset = filterConverter->toLong(arguments[6]);
- if(offset != 0.0)
+ if(offset != 0)
{
dplEvent->setOffset(offset);
}
else
{
- dplEvent->setOffset(-1);
+ dplEvent->setOffset(0);
}
}
dplEvent->setPrivateData( DPL::StaticPointerCast<IEventPrivateData> (cbm));