}
void PlayerMainWindow::setCoverArt(const QByteArray data) {
- qDebug() << "set cover art called! data.length" << data.length();
QPixmap* image = new QPixmap();
if (image->loadFromData(data)) {
- qDebug() << "image loaded!";
mHasImage = true;
ui->labelArtLandscape->setPixmap(image->scaledToHeight(120, Qt::SmoothTransformation));
ui->labelArtPortrait->setPixmap(image->scaledToHeight(310, Qt::SmoothTransformation));
}
else {
qDebug() << "image load failed!";
+ qDebug() << "data.length" << data.length();
ui->labelArtPortrait->setVisible(false);
ui->labelArtLandscape->setVisible(false);
}
else {
el->type = "node";
el->extension = getExtension(el->path, NULL);
- this->mContents->append(*el);
+ // empty nodes appear in the playlist when they can't be played!
+ if (node->hasChildNodes()) {
+ this->mContents->append(*el);
+ }
delete el;
// now parse the child nodes as leaf.
if (node->hasChildNodes()) {