Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

videodb: fix missing "where" in GetMusicVideoCount and GetRandomMusic…

…Video
  • Loading branch information...
commit 33ea3861daec0db858752637050332b351c92d07 1 parent e5bbb0f
Sascha Montellese Montellese authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 xbmc/video/VideoDatabase.cpp
4 xbmc/video/VideoDatabase.cpp
View
@@ -6310,7 +6310,7 @@ int CVideoDatabase::GetMusicVideoCount(const CStdString& strWhere)
if (NULL == m_pDS.get()) return 0;
CStdString strSQL;
- strSQL.Format("select count(1) as nummovies from musicvideoview %s",strWhere.c_str());
+ strSQL.Format("select count(1) as nummovies from musicvideoview where %s",strWhere.c_str());
m_pDS->query( strSQL.c_str() );
int iResult = 0;
@@ -7017,7 +7017,7 @@ bool CVideoDatabase::GetRandomMusicVideo(CFileItem* item, int& idSong, const CSt
// We don't use PrepareSQL here, as the WHERE clause is already formatted.
CStdString strSQL;
- strSQL.Format("select * from musicvideoview %s order by idMVideo limit 1 offset %i",strWhere.c_str(),iRandom);
+ strSQL.Format("select * from musicvideoview where %s order by idMVideo limit 1 offset %i",strWhere.c_str(),iRandom);
CLog::Log(LOGDEBUG, "%s query = %s", __FUNCTION__, strSQL.c_str());
// run query
if (!m_pDS->query(strSQL.c_str()))
Please sign in to comment.
Something went wrong with that request. Please try again.