Permalink
Browse files

[art] don't add art from parent items when setting art on children in…

… the database
  • Loading branch information...
1 parent b2d3bcb commit 215474faaa64cf775c3238466394fc99c5492031 Jonathan Marshall committed Nov 10, 2012
Showing with 8 additions and 0 deletions.
  1. +4 −0 xbmc/music/MusicDatabase.cpp
  2. +4 −0 xbmc/video/VideoDatabase.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())
@@ -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())

0 comments on commit 215474f

Please sign in to comment.