Permalink
Browse files

MythMusic: add storage group support in the AlbumArt visualiser

  • Loading branch information...
Paul Harrison
Paul Harrison committed Apr 24, 2013
1 parent 282b9e1 commit 998f203ec0dfb675af5a4d804a3bb29fee3e862e
Showing with 17 additions and 2 deletions.
  1. +17 −2 mythplugins/mythmusic/mythmusic/visualize.cpp
@@ -25,6 +25,7 @@ using namespace std;
#include <mythdbcon.h>
#include <mythcontext.h>
#include <mythuihelper.h>
#include <remotefile.h>
// mythmusic
#include "mainvisual.h"
@@ -1522,8 +1523,22 @@ bool AlbumArt::draw(QPainter *p, const QColor &back)
{
QImage art;
QString imageFilename = gPlayer->getCurrentMetadata()->getAlbumArtFile(m_currImageType);
if (!imageFilename.isEmpty())
art.load(imageFilename);
if (imageFilename.startsWith("myth://"))
{
RemoteFile *rf = new RemoteFile(imageFilename, false, false, 0);
QByteArray data;
bool ret = rf->SaveAs(data);
delete rf;
if (ret)
art.loadFromData(data);
}
else
if (!imageFilename.isEmpty())
art.load(imageFilename);
if (art.isNull())
{

0 comments on commit 998f203

Please sign in to comment.