2017-07-20, 04:45
I was looking at code, and it seems like for Music Videos, the design is to get an artist thumb and album thumb from the music database. This works for the artist thumb, but not the album thumb.
The code is in VideoThumbLoader.cpp:
I was hoping maybe some insight from a music db expert if this function is not properly attempting to get the album thumb?
scott s.
.
The code is in VideoThumbLoader.cpp:
Code:
bool CVideoThumbLoader::FillLibraryArt(CFileItem &item)
{
CVideoInfoTag &tag = *item.GetVideoInfoTag();
if (tag.m_iDbId > -1 && !tag.m_type.empty())
{
std::map<std::string, std::string> artwork;
m_videoDatabase->Open();
if (m_videoDatabase->GetArtForItem(tag.m_iDbId, tag.m_type, artwork))
SetArt(item, artwork);
else if (tag.m_type == "actor" && !tag.m_artist.empty())
{ // we retrieve music video art from the music database (no backward compat)
CMusicDatabase database;
database.Open();
int idArtist = database.GetArtistByName(item.GetLabel());
if (database.GetArtForItem(idArtist, MediaTypeArtist, artwork))
item.SetArt(artwork);
}
else if (tag.m_type == MediaTypeAlbum)
{ // we retrieve music video art from the music database (no backward compat)
CMusicDatabase database;
database.Open();
int idAlbum = database.GetAlbumByName(item.GetLabel(), tag.m_artist);
if (database.GetArtForItem(idAlbum, MediaTypeAlbum, artwork))
item.SetArt(artwork);
}
I was hoping maybe some insight from a music db expert if this function is not properly attempting to get the album thumb?
scott s.
.