Fix various artists in medialib.
This commit is contained in:
parent
152e1b2be8
commit
52e75244fc
3 changed files with 6 additions and 5 deletions
|
@ -57,7 +57,7 @@ MedialibList::MedialibList (QWidget *parent) : QListWidget (parent)
|
|||
dir.mkpath (dir.path ());
|
||||
}
|
||||
|
||||
xmmsh->medialibQuery ("select distinct m1.value as artist, ifnull(m2.value,'[unknown]') as album, m4.value as image from Media m1 left join Media m2 on m1.id = m2.id and m2.key='album' left join Media m3 on m1.id = m3.id and m3.key='compilation' left join Media m4 on m4.id = m1.id and m4.key='album_front_small' where m1.key='artist' and m3.value is null");
|
||||
xmmsh->medialibQuery ("select distinct ifnull(nullif(ifnull(nullif(ifnull(m3.value,0),1),'Various Artists'),0),m1.value) as artist, ifnull(m2.value,'[unknown]') as album, m4.value as image from Media m1 left join Media m2 on m1.id = m2.id and m2.key='album' left join Media m3 on m1.id = m3.id and m3.key='compilation' left join Media m4 on m4.id = m1.id and m4.key='album_front_small' where m1.key='artist' order by artist, album");
|
||||
|
||||
connect (xmmsh, SIGNAL (medialibResponse (QList<QHash<QString, QString> >)),
|
||||
this, SLOT (queryCallback (QList<QHash<QString, QString> >)));
|
||||
|
|
|
@ -398,7 +398,11 @@ PlaylistList::dropEvent (QDropEvent *event)
|
|||
stream >> album;
|
||||
|
||||
QString query;
|
||||
query.sprintf ("select m1.id as id, ifnull(m3.value,-1) as tracknr from Media m1 join Media m2 on m1.id = m2.id and m2.key='album' left join Media m3 on m1.id = m3.id and m3.key='tracknr' where m1.key='artist' and m1.value='%s' and m2.value='%s' order by tracknr", artist.toUtf8 ().data (), album.toUtf8 ().data ());
|
||||
if (artist == "Various Artists") {
|
||||
query.sprintf ("select m1.id as id, ifnull(m3.value,-1) as tracknr from Media m1 join Media m2 on m1.id = m2.id and m2.key='compilation' left join Media m3 on m1.id = m3.id and m3.key='tracknr' where m1.key='album' and m1.value='%s' and m2.value=1 order by tracknr", album.toUtf8 ().data ());
|
||||
} else {
|
||||
query.sprintf ("select m1.id as id, ifnull(m3.value,-1) as tracknr from Media m1 join Media m2 on m1.id = m2.id and m2.key='album' left join Media m3 on m1.id = m3.id and m3.key='tracknr' where m1.key='artist' and m1.value='%s' and m2.value='%s' order by tracknr", artist.toUtf8 ().data (), album.toUtf8 ().data ());
|
||||
}
|
||||
|
||||
xmmsh->medialibQueryAdd (query);
|
||||
|
||||
|
|
|
@ -147,9 +147,6 @@ TextScroller::drawBitmapFont (QString text)
|
|||
QPixmap p = skin->getLetter (t[i]);
|
||||
if (p.isNull ()) {
|
||||
p = skin->getLetter(' ');
|
||||
if (p.isNull ()) {
|
||||
qDebug ("abort ffs!");
|
||||
}
|
||||
}
|
||||
|
||||
paint.drawPixmap (QRect ((i * 6), m_y, 4, 6),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue