diff --git a/ubuntu/main.cpp b/ubuntu/main.cpp index 4f3a926d6..f1962290b 100644 --- a/ubuntu/main.cpp +++ b/ubuntu/main.cpp @@ -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); diff --git a/ubuntu/qml/cantata/ArtistPage.qml b/ubuntu/qml/cantata/ArtistPage.qml index aafceebbd..73a0b1360 100644 --- a/ubuntu/qml/cantata/ArtistPage.qml +++ b/ubuntu/qml/cantata/ArtistPage.qml @@ -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) + } } }