Use QFileInfo::path instead of QUrl::RemoveFilename
This commit is contained in:
parent
b87a950357
commit
354b55cbbc
|
@ -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);
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <QScreen>
|
||||
#include <QItemSelectionModel>
|
||||
#include <QListWidgetItem>
|
||||
#include <QFileInfo>
|
||||
#include <QFile>
|
||||
#include <QSet>
|
||||
#include <QVariant>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue