diff options
-rw-r--r-- | addons/xbmc.metadata/addon.xml | 2 | ||||
-rw-r--r-- | xbmc/utils/ScraperParser.cpp | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/addons/xbmc.metadata/addon.xml b/addons/xbmc.metadata/addon.xml index f40ed0c4e9..02bfd34f2b 100644 --- a/addons/xbmc.metadata/addon.xml +++ b/addons/xbmc.metadata/addon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<addon id="xbmc.metadata" version="2.0" provider-name="Team XBMC"> +<addon id="xbmc.metadata" version="2.1" provider-name="Team XBMC"> <backwards-compatibility abi="1.0"/> <requires> <import addon="xbmc.core" version="0.1"/> diff --git a/xbmc/utils/ScraperParser.cpp b/xbmc/utils/ScraperParser.cpp index f8e1b3e6e9..1624cea2aa 100644 --- a/xbmc/utils/ScraperParser.cpp +++ b/xbmc/utils/ScraperParser.cpp @@ -164,6 +164,18 @@ void CScraperParser::ReplaceBuffers(CStdString& strDest) strDest.replace(strDest.begin()+iIndex,strDest.begin()+iEnd+1,strReplace); iIndex += strReplace.length(); } + // insert localize strings + iIndex = 0; + while ((size_t)(iIndex = strDest.find("$LOCALIZE[",iIndex)) != CStdString::npos) + { + int iEnd = strDest.Find("]",iIndex); + CStdString strInfo = strDest.Mid(iIndex+10,iEnd-iIndex-10); + CStdString strReplace; + if (m_scraper) + strReplace = m_scraper->GetString(strtol(strInfo.c_str(),NULL,10)); + strDest.replace(strDest.begin()+iIndex,strDest.begin()+iEnd+1,strReplace); + iIndex += strReplace.length(); + } iIndex = 0; while ((size_t)(iIndex = strDest.find("\\n",iIndex)) != CStdString::npos) strDest.replace(strDest.begin()+iIndex,strDest.begin()+iIndex+2,"\n"); |