aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gilbert <chris@dokein.co.uk>2014-02-17 21:11:02 +0000
committerChris Gilbert <chris@dokein.co.uk>2014-02-17 22:44:21 +0000
commit8f8b9c18ab091ec012268a19646ac8194e78fc14 (patch)
tree750d7fcce21646c3ea1571e420dfad02ae1f673d
parent43a62fe36b4530c07efb8c6aa7dbdcf7c406af63 (diff)
Update DeleteMovie to remove links to writers (Fixes 14940)
DeleteMovie needs updating to remove entries in writerlinkmovie, otherwise any updates to the list of writers for a movie may not be correctly reflected, as new entries will be append and old entries are not removed.
-rw-r--r--xbmc/video/VideoDatabase.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
index 003fc5f02d..2db5c2d5cf 100644
--- a/xbmc/video/VideoDatabase.cpp
+++ b/xbmc/video/VideoDatabase.cpp
@@ -2865,6 +2865,9 @@ void CVideoDatabase::DeleteMovie(const CStdString& strFilenameAndPath, bool bKee
strSQL=PrepareSQL("delete from countrylinkmovie where idMovie=%i", idMovie);
m_pDS->exec(strSQL.c_str());
+ strSQL=PrepareSQL("delete from writerlinkmovie where idMovie=%i", idMovie);
+ m_pDS->exec(strSQL.c_str());
+
DeleteStreamDetails(GetFileId(strFilenameAndPath));
// keep the movie table entry, linking to tv shows, and bookmarks