From 215474faaa64cf775c3238466394fc99c5492031 Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 10 Nov 2012 21:55:37 +1300 Subject: [art] don't add art from parent items when setting art on children in the database --- xbmc/music/MusicDatabase.cpp | 4 ++++ xbmc/video/VideoDatabase.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp index e12f0cf550..24960de13e 100644 --- a/xbmc/music/MusicDatabase.cpp +++ b/xbmc/music/MusicDatabase.cpp @@ -5151,6 +5151,10 @@ void CMusicDatabase::SetArtForItem(int mediaId, const string &mediaType, const s if (NULL == m_pDB.get()) return; if (NULL == m_pDS.get()) return; + // don't set . art types - these are derivative types from parent items + if (artType.find('.') != string::npos) + return; + CStdString sql = PrepareSQL("SELECT art_id FROM art WHERE media_id=%i AND media_type='%s' AND type='%s'", mediaId, mediaType.c_str(), artType.c_str()); m_pDS->query(sql.c_str()); if (!m_pDS->eof()) diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp index 4a073659af..69e9488e7a 100644 --- a/xbmc/video/VideoDatabase.cpp +++ b/xbmc/video/VideoDatabase.cpp @@ -3568,6 +3568,10 @@ void CVideoDatabase::SetArtForItem(int mediaId, const string &mediaType, const s if (NULL == m_pDB.get()) return; if (NULL == m_pDS.get()) return; + // don't set . art types - these are derivative types from parent items + if (artType.find('.') != string::npos) + return; + CStdString sql = PrepareSQL("SELECT art_id FROM art WHERE media_id=%i AND media_type='%s' AND type='%s'", mediaId, mediaType.c_str(), artType.c_str()); m_pDS->query(sql.c_str()); if (!m_pDS->eof()) -- cgit v1.2.3