Commit 8e4ad45f authored by Richard Lärkäng's avatar Richard Lärkäng
Browse files

Load all albums, and get correct album artist

svn path=/trunk/KDE/kdemultimedia/libkcddb/; revision=500911
parent f0eb0e50
......@@ -65,20 +65,23 @@ namespace KCDDB
return UnknownError;
}
if (mb.DataInt(MBE_GetNumAlbums) < 1)
int nrAlbums = mb.DataInt(MBE_GetNumAlbums);
if (nrAlbums < 1)
{
kdDebug() << "No CD Found" << endl;
return UnknownError;
}
mb.Select(MBS_SelectAlbum, 1);
for (int i=1; i <= nrAlbums; i++)
{
mb.Select(MBS_SelectAlbum, i);
CDInfo info;
info.set(Title, QString::fromUtf8(mb.Data(MBE_AlbumGetAlbumName).c_str()));
// FIXME
info.set(Artist, QString::fromUtf8(mb.Data(MBE_AlbumGetArtistName, 1).c_str()));
info.set(Artist, QString::fromUtf8(mb.Data(MBE_AlbumGetArtistName).c_str()));
int numTracks = trackOffsetList.count()-1;
......@@ -89,9 +92,10 @@ namespace KCDDB
track.set(Title, QString::fromUtf8(mb.Data(MBE_AlbumGetTrackName, i).c_str()));
}
kdDebug() << "Query succeeded :-)" << endl;
cdInfoList_ << info;
}
kdDebug() << "Query succeeded :-)" << endl;
return Success;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment