scurlMovie.strTitle.AppendFormat(" (%s)", sCompareYear.c_str());
CStdString sLanguage;
- if (XMLUtils::GetString(pxeMovie, "language", sLanguage))
+ if (XMLUtils::GetString(pxeMovie, "language", sLanguage) && !sLanguage.empty())
scurlMovie.strTitle.AppendFormat(" (%s)", sLanguage.c_str());
// filter for dupes from naughty scrapers
pxeAlbum; pxeAlbum = pxeAlbum->NextSiblingElement())
{
CStdString sTitle;
- if (XMLUtils::GetString(pxeAlbum, "title", sTitle))
+ if (XMLUtils::GetString(pxeAlbum, "title", sTitle) && !sTitle.empty())
{
CStdString sArtist;
CStdString sAlbumName;
- if (XMLUtils::GetString(pxeAlbum, "artist", sArtist))
+ if (XMLUtils::GetString(pxeAlbum, "artist", sArtist) && !sArtist.empty())
sAlbumName.Format("%s - %s", sArtist.c_str(), sTitle.c_str());
else
sAlbumName = sTitle;
CStdString sYear;
- if (XMLUtils::GetString(pxeAlbum, "year", sYear))
+ if (XMLUtils::GetString(pxeAlbum, "year", sYear) && !sYear.empty())
sAlbumName.Format("%s (%s)", sAlbumName.c_str(), sYear.c_str());
// if no URL is provided, use the URL we got back from CreateAlbumSearchUrl
TiXmlElement *pxeLink = pxeMovie->FirstChildElement("url");
CStdString strEpNum;
if (pxeLink && XMLUtils::GetInt(pxeMovie, "season", ep.iSeason) &&
- XMLUtils::GetString(pxeMovie, "epnum", strEpNum))
+ XMLUtils::GetString(pxeMovie, "epnum", strEpNum) && !strEpNum.empty())
{
CScraperUrl &scurlEp(ep.cScraperUrl);
int dot = strEpNum.Find(".");
ep.iEpisode = atoi(strEpNum.c_str());
ep.iSubepisode = (dot > -1) ? atoi(strEpNum.Mid(dot + 1).c_str()) : 0;
- if (!XMLUtils::GetString(pxeMovie, "title", scurlEp.strTitle))
+ if (!XMLUtils::GetString(pxeMovie, "title", scurlEp.strTitle) || scurlEp.strTitle.empty() )
scurlEp.strTitle = g_localizeStrings.Get(416);
XMLUtils::GetString(pxeMovie, "id", scurlEp.strId);
m_warpcursor = WARP_BOTTOM_RIGHT;
CStdString warpCursor;
- if (XMLUtils::GetString(pConfig, "warpcursor", warpCursor))
+ if (XMLUtils::GetString(pConfig, "warpcursor", warpCursor) && !warpCursor.empty())
{
if (warpCursor == "bottomright") m_warpcursor = WARP_BOTTOM_RIGHT;
else if (warpCursor == "bottomleft") m_warpcursor = WARP_BOTTOM_LEFT;
// get the default value
CStdString value;
- if (XMLUtils::GetString(node, XML_ELM_DEFAULT, value))
+ if (XMLUtils::GetString(node, XML_ELM_DEFAULT, value) && !value.empty())
m_value = m_default = value;
else if (!update && !m_allowEmpty)
{
if (constraints != NULL)
{
// get the addon type
- if (XMLUtils::GetString(constraints, "addontype", strAddonType))
+ if (XMLUtils::GetString(constraints, "addontype", strAddonType) && !strAddonType.empty())
{
m_addonType = ADDON::TranslateType(strAddonType);
if (m_addonType != ADDON::ADDON_UNKNOWN)
// get the default value by abusing the FromString
// implementation to parse the default value
CStdString value;
- if (XMLUtils::GetString(node, XML_ELM_DEFAULT, value))
+ if (XMLUtils::GetString(node, XML_ELM_DEFAULT, value) && !value.empty())
m_value = m_default = value;
else if (!update && !m_allowEmpty)
{
bool XMLUtils::GetDate(const TiXmlNode* pRootNode, const char* strTag, CDateTime& date)
{
CStdString strDate;
- if (GetString(pRootNode, strTag, strDate))
+ if (GetString(pRootNode, strTag, strDate) && !strDate.empty())
{
date.SetFromDBDate(strDate);
return true;
bool XMLUtils::GetDateTime(const TiXmlNode* pRootNode, const char* strTag, CDateTime& dateTime)
{
CStdString strDateTime;
- if (GetString(pRootNode, strTag, strDateTime))
+ if (GetString(pRootNode, strTag, strDateTime) && !strDateTime.empty())
{
dateTime.SetFromDBDateTime(strDateTime);
return true;
while (path)
{
CStdString strPath;
- if (XMLUtils::GetString(path,"url",strPath))
+ if (XMLUtils::GetString(path,"url",strPath) && !strPath.empty())
AddPath(strPath);
CStdString content;
- if (XMLUtils::GetString(path,"content", content))
+ if (XMLUtils::GetString(path,"content", content) && !content.empty())
{ // check the scraper exists, if so store the path
AddonPtr addon;
CStdString id;
XMLUtils::GetString(movie, "plot", m_strPlot);
XMLUtils::GetString(movie, "tagline", m_strTagLine);
CStdString runtime;
- if (XMLUtils::GetString(movie, "runtime", runtime))
+ if (XMLUtils::GetString(movie, "runtime", runtime) && !runtime.empty())
m_duration = GetDurationFromMinuteString(runtime);
XMLUtils::GetString(movie, "mpaa", m_strMPAARating);
XMLUtils::GetInt(movie, "playcount", m_playCount);