diff --git a/src/covermanager/albumcoverchoicecontroller.cpp b/src/covermanager/albumcoverchoicecontroller.cpp index cdf137c9..35b34998 100644 --- a/src/covermanager/albumcoverchoicecontroller.cpp +++ b/src/covermanager/albumcoverchoicecontroller.cpp @@ -642,7 +642,7 @@ QUrl AlbumCoverChoiceController::SaveCoverToFileAutomatic(const Song *song, cons song->effective_albumartist(), song->effective_album(), song->album_id(), - song->url().adjusted(QUrl::RemoveFilename).path(), + QFileInfo(song->url().toLocalFile()).path(), result, force_overwrite); diff --git a/src/covermanager/albumcovermanager.cpp b/src/covermanager/albumcovermanager.cpp index 8f241c51..021663bd 100644 --- a/src/covermanager/albumcovermanager.cpp +++ b/src/covermanager/albumcovermanager.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -965,7 +966,7 @@ void AlbumCoverManager::SaveAndSetCover(AlbumItem *album_item, const AlbumCoverI cover_url = result.cover_url; } else if (!result.image_data.isEmpty() || !result.image.isNull()) { - cover_url = album_cover_choice_controller_->SaveCoverToFileAutomatic(Song::Source::Collection, albumartist, album, QString(), urls.first().adjusted(QUrl::RemoveFilename).path(), result, false); + cover_url = album_cover_choice_controller_->SaveCoverToFileAutomatic(Song::Source::Collection, albumartist, album, QString(), QFileInfo(urls.first().toLocalFile()).path(), result, false); } if (cover_url.isEmpty()) return;