diff options
author | vdrfan <vdrfan@svn> | 2010-08-26 18:16:16 +0000 |
---|---|---|
committer | vdrfan <vdrfan@svn> | 2010-08-26 18:16:16 +0000 |
commit | cd603860cfbd51252f778acfee720f8e1cb36cbb (patch) | |
tree | f26d9581a5f84111863217a33ad37c395435f485 | |
parent | 4cb1ec3a155e3c476be0d42faa83e4ac306fc415 (diff) |
fixed: #9996 - searches returning duplicate results
(cherry picked from commit f90a47f669dc7698e9dd8c6572fb6868c0851c7f)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@33168 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/VideoDatabase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xbmc/VideoDatabase.cpp b/xbmc/VideoDatabase.cpp index dd061501bf..068e93cc45 100644 --- a/xbmc/VideoDatabase.cpp +++ b/xbmc/VideoDatabase.cpp @@ -6014,9 +6014,9 @@ void CVideoDatabase::GetMovieDirectorsByName(const CStdString& strSearch, CFileI if (NULL == m_pDS.get()) return; if (g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser) - strSQL = PrepareSQL("select directorlinkmovie.idDirector,actors.strActor,path.strPath from movie,files,path,actors,directorlinkmovie where files.idFile=movie.idFile and files.idPath=path.idPath and directorlinkmovie.idMovie=movie.idMovie and directorlinkmovie.idDirector=actors.idActor and actors.strActor like '%%%s%%'",strSearch.c_str()); + strSQL = PrepareSQL("select distinct directorlinkmovie.idDirector,actors.strActor,path.strPath from movie,files,path,actors,directorlinkmovie where files.idFile=movie.idFile and files.idPath=path.idPath and directorlinkmovie.idMovie=movie.idMovie and directorlinkmovie.idDirector=actors.idActor and actors.strActor like '%%%s%%'",strSearch.c_str()); else - strSQL = PrepareSQL("select directorlinkmovie.idDirector,actors.strActor from movie,actors,directorlinkmovie where directorlinkmovie.idMovie=movie.idMovie and directorlinkmovie.idDirector=actors.idActor and actors.strActor like '%%%s%%'",strSearch.c_str()); + strSQL = PrepareSQL("select distinct directorlinkmovie.idDirector,actors.strActor from movie,actors,directorlinkmovie where directorlinkmovie.idMovie=movie.idMovie and directorlinkmovie.idDirector=actors.idActor and actors.strActor like '%%%s%%'",strSearch.c_str()); m_pDS->query( strSQL.c_str() ); |