Use the 'effective_album' title when searching for a track's cover

This commit is contained in:
santigl 2017-03-04 15:23:38 -03:00 committed by John Maguire
parent e30e6da065
commit 82f0d261fa
2 changed files with 7 additions and 6 deletions

View File

@ -180,12 +180,12 @@ QString AlbumCoverChoiceController::LoadCoverFromURL(Song* song) {
QString AlbumCoverChoiceController::SearchForCover(Song* song) {
// Get something sensible to stick in the search box
QImage image =
cover_searcher_->Exec(song->effective_albumartist(), song->album());
QImage image = cover_searcher_->Exec(song->effective_albumartist(),
song->effective_album());
if (!image.isNull()) {
QString cover =
SaveCoverInCache(song->effective_albumartist(), song->album(), image);
QString cover = SaveCoverInCache(song->effective_albumartist(),
song->effective_album(), image);
SaveCover(song, cover);
return cover;
@ -248,7 +248,7 @@ void AlbumCoverChoiceController::ShowCover(const Song& song) {
void AlbumCoverChoiceController::SearchCoverAutomatically(const Song& song) {
qint64 id = cover_fetcher_->FetchAlbumCover(song.effective_albumartist(),
song.album());
song.effective_album());
cover_fetching_tasks_[id] = song;
}

View File

@ -683,7 +683,8 @@ bool NowPlayingWidget::GetCoverAutomatically() {
album_cover_choice_controller_->search_cover_auto_action()->isChecked() &&
!metadata_.has_manually_unset_cover() &&
metadata_.art_automatic().isEmpty() && metadata_.art_manual().isEmpty() &&
!metadata_.artist().isEmpty() && !metadata_.album().isEmpty();
!metadata_.effective_albumartist().isEmpty() &&
!metadata_.effective_album().isEmpty();
if (search) {
qLog(Debug) << "GetCoverAutomatically";