Skip to content

Commit

Permalink
MP1-1961: Embedded Cover Art can now also displayed using Database Views
Browse files Browse the repository at this point in the history
  • Loading branch information
hwahrmann committed Nov 6, 2014
1 parent c5134ab commit 155735e
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions mediaportal/WindowPlugins/GUIMusic/GUIMusicGenres.cs
Expand Up @@ -516,8 +516,9 @@ protected override void OnRetrieveCoverArt(GUIListItem item)
}
// Add Code here if users want to add pics showing "A", "B" and "C" ;)
}
else
{
else
{
MusicTag tag;
switch (filter.Where)
{
case "genre":
Expand Down Expand Up @@ -547,6 +548,17 @@ protected override void OnRetrieveCoverArt(GUIListItem item)

case "track":
{
// If we want to get the Cover from embedded cover arts, we need to re-read the Tag from the file,
// since the database query didn't return a cover
if (_useEmbeddedCover)
{
tag = item.MusicTag as MusicTag;
if (tag != null && tag.CoverArtImageBytes == null)
{
item.MusicTag = TagReader.TagReader.ReadTag(item.Path);
}
}

base.OnRetrieveCoverArt(item);
break;
}
Expand All @@ -555,7 +567,7 @@ protected override void OnRetrieveCoverArt(GUIListItem item)
case "album":

bool thumbFound = false;
MusicTag tag = item.MusicTag as MusicTag;
tag = item.MusicTag as MusicTag;
strThumb = Util.Utils.GetAlbumThumbName(tag.Artist, tag.Album);
if (Util.Utils.FileExistsInCache(strThumb))
{
Expand Down

0 comments on commit 155735e

Please sign in to comment.