Use QUrl::isLocalFile()
This commit is contained in:
@@ -202,7 +202,7 @@ void Organise::ProcessSomeFiles() {
|
||||
job.remove_original_ = !copy_;
|
||||
|
||||
if (task.song_info_.song_.art_manual_is_valid() && task.song_info_.song_.art_manual().path() != Song::kManuallyUnsetCover) {
|
||||
if (task.song_info_.song_.art_manual().scheme() == "file" && QFile::exists(task.song_info_.song_.art_manual().toLocalFile())) {
|
||||
if (task.song_info_.song_.art_manual().isLocalFile() && QFile::exists(task.song_info_.song_.art_manual().toLocalFile())) {
|
||||
job.cover_source_ = task.song_info_.song_.art_manual().toLocalFile();
|
||||
}
|
||||
else if (task.song_info_.song_.art_manual().scheme().isEmpty() && QFile::exists(task.song_info_.song_.art_manual().path())) {
|
||||
@@ -210,7 +210,7 @@ void Organise::ProcessSomeFiles() {
|
||||
}
|
||||
}
|
||||
else if (task.song_info_.song_.art_automatic_is_valid() && task.song_info_.song_.art_automatic().path() != Song::kEmbeddedCover) {
|
||||
if (task.song_info_.song_.art_automatic().scheme() == "file" && QFile::exists(task.song_info_.song_.art_automatic().toLocalFile())) {
|
||||
if (task.song_info_.song_.art_automatic().isLocalFile() && QFile::exists(task.song_info_.song_.art_automatic().toLocalFile())) {
|
||||
job.cover_source_ = task.song_info_.song_.art_automatic().toLocalFile();
|
||||
}
|
||||
else if (task.song_info_.song_.art_automatic().scheme().isEmpty() && QFile::exists(task.song_info_.song_.art_automatic().path())) {
|
||||
|
||||
@@ -157,7 +157,7 @@ bool OrganiseDialog::SetSongs(const SongList &songs) {
|
||||
songs_.clear();
|
||||
|
||||
for (const Song &song : songs) {
|
||||
if (song.url().scheme() != "file") {
|
||||
if (!song.url().isLocalFile()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user