Skip to content

Commit

Permalink
[videodatabase] path hash is not invalidated when removing musicvideo…
Browse files Browse the repository at this point in the history
… from library
  • Loading branch information
mkortstiege committed Oct 27, 2014
1 parent 5ccad4f commit 8eeafa7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions xbmc/video/VideoDatabase.cpp
Expand Up @@ -3402,14 +3402,13 @@ void CVideoDatabase::DeleteMusicVideo(int idMVideo, bool bKeepId /* = false */)
// the ancilliary tables are still purged
if (!bKeepId)
{
strSQL=PrepareSQL("delete from musicvideo where idMVideo=%i", idMVideo);
m_pDS->exec(strSQL.c_str());

// TODO: Why are we invalidating paths here?
int idFile = GetDbId(PrepareSQL("SELECT idFile FROM musicvideo WHERE idMVideo=%i", idMVideo));
std::string path = GetSingleValue(PrepareSQL("SELECT strPath FROM path JOIN files ON files.idPath=path.idPath WHERE files.idFile=%i", idFile));
if (!path.empty())
InvalidatePathHash(path);

strSQL=PrepareSQL("delete from musicvideo where idMVideo=%i", idMVideo);
m_pDS->exec(strSQL.c_str());
}

//TODO: move this below CommitTransaction() once UPnP doesn't rely on this anymore
Expand Down

0 comments on commit 8eeafa7

Please sign in to comment.