Skip to content
This repository
Browse code

album art for individual songs in file mode weren't loading correctly…

… - fixes #13906
  • Loading branch information...
commit 3c2fc89d97b5dbcfa86bb057e43894e30adb9e98 1 parent 59a994c
authored January 07, 2013

Showing 1 changed file with 6 additions and 3 deletions. Show diff stats Hide diff stats

  1. 9  xbmc/music/MusicInfoLoader.cpp
9  xbmc/music/MusicInfoLoader.cpp
@@ -138,7 +138,8 @@ bool CMusicInfoLoader::LoadItem(CFileItem* pItem)
138 138
     if (mapItem && mapItem->m_dateTime==pItem->m_dateTime && mapItem->HasMusicInfoTag() && mapItem->GetMusicInfoTag()->Loaded())
139 139
     { // Query map if we previously cached the file on HD
140 140
       *pItem->GetMusicInfoTag() = *mapItem->GetMusicInfoTag();
141  
-      pItem->SetArt("thumb", mapItem->GetArt("thumb"));
  141
+      if (mapItem->HasArt("thumb"))
  142
+        pItem->SetArt("thumb", mapItem->GetArt("thumb"));
142 143
     }
143 144
     else
144 145
     {
@@ -158,7 +159,8 @@ bool CMusicInfoLoader::LoadItem(CFileItem* pItem)
158 159
       if ((song=m_songsMap.Find(pItem->GetPath()))!=NULL)
159 160
       {  // Have we loaded this item from database before
160 161
         pItem->GetMusicInfoTag()->SetSong(*song);
161  
-        pItem->SetArt("thumb", song->strThumb);
  162
+        if (!song->strThumb.empty())
  163
+          pItem->SetArt("thumb", song->strThumb);
162 164
       }
163 165
       else if (pItem->IsMusicDb())
164 166
       { // a music db item that doesn't have tag loaded - grab details from the database
@@ -168,7 +170,8 @@ bool CMusicInfoLoader::LoadItem(CFileItem* pItem)
168 170
         if (m_musicDatabase.GetSongById(param.GetSongId(), song))
169 171
         {
170 172
           pItem->GetMusicInfoTag()->SetSong(song);
171  
-          pItem->SetArt("thumb", song.strThumb);
  173
+          if (!song.strThumb.empty())
  174
+            pItem->SetArt("thumb", song.strThumb);
172 175
         }
173 176
       }
174 177
       else if (g_guiSettings.GetBool("musicfiles.usetags") || pItem->IsCDDA())

0 notes on commit 3c2fc89

Please sign in to comment.
Something went wrong with that request. Please try again.