-
-
Save pieh/178db5cf98183995f248 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp | |
index b7ec409..3012703 100644 | |
--- a/xbmc/video/VideoDatabase.cpp | |
+++ b/xbmc/video/VideoDatabase.cpp | |
@@ -659,7 +659,7 @@ int CVideoDatabase::AddFile(const CStdString& strFileNameAndPath) | |
if (idPath < 0) | |
return -1; | |
- CStdString strSQL=PrepareSQL("select idFile from files where strFileName like '%s' and idPath=%i", strFileName.c_str(),idPath); | |
+ CStdString strSQL=PrepareSQL("select idFile from files where strFileName = '%s' and idPath=%i", strFileName.c_str(),idPath); | |
m_pDS->query(strSQL.c_str()); | |
if (m_pDS->num_rows() > 0) | |
@@ -850,7 +850,7 @@ int CVideoDatabase::GetFileId(const CStdString& strFilenameAndPath) | |
if (idPath >= 0) | |
{ | |
CStdString strSQL; | |
- strSQL=PrepareSQL("select idFile from files where strFileName like '%s' and idPath=%i", strFileName.c_str(),idPath); | |
+ strSQL=PrepareSQL("select idFile from files where strFileName = '%s' and idPath=%i", strFileName.c_str(),idPath); | |
m_pDS->query(strSQL.c_str()); | |
if (m_pDS->num_rows() > 0) | |
{ | |
@@ -3148,7 +3148,7 @@ bool CVideoDatabase::GetVideoSettings(const CStdString &strFilenameAndPath, CVid | |
if (NULL == m_pDS.get()) return false; | |
CStdString strPath, strFileName; | |
URIUtils::Split(strFilenameAndPath, strPath, strFileName); | |
- CStdString strSQL=PrepareSQL("select * from settings, files, path where settings.idFile=files.idFile and path.idPath=files.idPath and path.strPath='%s' and files.strFileName like '%s'", strPath.c_str() , strFileName.c_str()); | |
+ CStdString strSQL=PrepareSQL("select * from settings, files, path where settings.idFile=files.idFile and path.idPath=files.idPath and path.strPath='%s' and files.strFileName = '%s'", strPath.c_str() , strFileName.c_str()); | |
#else | |
int idFile = GetFileId(strFilenameAndPath); | |
if (idFile < 0) return false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment