Artist images

This commit is contained in:
craig.p.drummond
2014-04-13 06:31:25 +00:00
committed by craig.p.drummond
parent 0214923ea7
commit c809d16fbe
2 changed files with 19 additions and 1 deletions

View File

@@ -188,6 +188,8 @@ int main(int argc, char *argv[])
MPDStats::self();
MPDConnection::self();
MusicLibraryModel::self()->setUseArtistImages(true); // TODO: Configurable?
MPDBackend backend;
QGuiApplication app(argc, argv);

View File

@@ -92,9 +92,25 @@ Page {
clip: true
delegate: ListItemDelegate {
id: delegate
text: model.mainText
subText: model.subText
// progression: true //Removed due to the app showdown, will be implemented later
iconSource: !(model.image.indexOf("qrc:") === 0)?"file:" + model.image:model.image
firstButtonImageSource: "../../icons/toolbar/media-playback-start-light.svg"
secondButtonImageSource: "../../icons/toolbar/add.svg"
// progression: true //Removed due to the app showdown, will be implemented later
// onIconSourceChanged: console.log("Debug iconSource: " + iconSource)
onFirstImageButtonClicked: add(true)
onSecondImageButtonClicked: add(false)
function add(replace) {
// TODO: Artist or album?
//backend.addArtist(index, replace)
pageStack.push(currentlyPlayingPage)
}
}
}