aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Marshall <jmarshall@never.you.mind>2012-11-10 21:55:37 +1300
committerJonathan Marshall <jmarshall@never.you.mind>2012-11-11 09:08:57 +1300
commit215474faaa64cf775c3238466394fc99c5492031 (patch)
treecf6d6ba0573e2ca5fcadc0ab4da34aa427dde26a
parentb2d3bcbc46f8d05eda23c23fa6cd5d68bfef1716 (diff)
[art] don't add art from parent items when setting art on children in the database
-rw-r--r--xbmc/music/MusicDatabase.cpp4
-rw-r--r--xbmc/video/VideoDatabase.cpp4
2 files changed, 8 insertions, 0 deletions
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 <foo>.<bar> 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 <foo>.<bar> 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())