Fix TryLoadPixmap and ShowCover
This commit is contained in:
@@ -256,14 +256,11 @@ void AlbumCoverChoiceController::ShowCover(const Song &song) {
|
||||
|
||||
}
|
||||
|
||||
void AlbumCoverChoiceController::ShowCover(const Song &song, const QImage image) {
|
||||
void AlbumCoverChoiceController::ShowCover(const Song &song, const QImage &image) {
|
||||
|
||||
QUrl url_manual(song.art_manual());
|
||||
QUrl url_automatic(song.art_automatic());
|
||||
|
||||
if (url_manual.isLocalFile() || url_automatic.isLocalFile()) {
|
||||
if (song.art_manual().isLocalFile() || song.art_automatic().isLocalFile()) {
|
||||
QPixmap pixmap = AlbumCoverLoader::TryLoadPixmap(song.art_automatic(), song.art_manual(), song.url().toLocalFile());
|
||||
ShowCover(song, pixmap);
|
||||
if (!pixmap.isNull()) ShowCover(song, pixmap);
|
||||
}
|
||||
else if (!image.isNull()) ShowCover(song, QPixmap::fromImage(image));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user