Commit 7c4a203b authored by camilo higuita's avatar camilo higuita

needed changes for new mauikit kio based

parent 646f52a2
Pipeline #6535 failed with stage
in 7 minutes and 16 seconds
...@@ -107,7 +107,7 @@ void AlbumsModel::setList() ...@@ -107,7 +107,7 @@ void AlbumsModel::setList()
//get albums data with modifier for missing images for artworks //get albums data with modifier for missing images for artworks
this->list = this->db->getDBData(m_Query, [&](FMH::MODEL &item) this->list = this->db->getDBData(m_Query, [&](FMH::MODEL &item)
{ {
if(!item[FMH::MODEL_KEY::ARTWORK].isEmpty() && !FMH::fileExists(item[FMH::MODEL_KEY::ARTWORK])) if(!item[FMH::MODEL_KEY::ARTWORK].isEmpty() && !FMH::fileExists(QUrl::fromLocalFile(item[FMH::MODEL_KEY::ARTWORK])))
{ {
this->db->removeArtwork(FMH::MODEL_NAME[static_cast<FMH::MODEL_KEY>(this->query)], FM::toMap(item)); this->db->removeArtwork(FMH::MODEL_NAME[static_cast<FMH::MODEL_KEY>(this->query)], FM::toMap(item));
item[FMH::MODEL_KEY::ARTWORK] = ""; item[FMH::MODEL_KEY::ARTWORK] = "";
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <QObject> #include <QObject>
#include <QDirIterator> #include <QDirIterator>
#include <QUrl>
#include "../services/local/taginfo.h" #include "../services/local/taginfo.h"
#include "../db/collectionDB.h" #include "../db/collectionDB.h"
#include "utils/bae.h" #include "utils/bae.h"
...@@ -12,7 +13,7 @@ namespace FLoader ...@@ -12,7 +13,7 @@ namespace FLoader
inline QStringList getPathContents(QStringList &urls, const QString &path) inline QStringList getPathContents(QStringList &urls, const QString &path)
{ {
if(!FMH::fileExists(path)) if(!FMH::fileExists(QUrl::fromLocalFile(path)))
return urls; return urls;
if (QFileInfo(path).isDir()) if (QFileInfo(path).isDir())
...@@ -35,7 +36,7 @@ inline uint getTracks(const QStringList& paths) ...@@ -35,7 +36,7 @@ inline uint getTracks(const QStringList& paths)
const auto urls = std::accumulate(paths.begin(), paths.end(), QStringList(), getPathContents); const auto urls = std::accumulate(paths.begin(), paths.end(), QStringList(), getPathContents);
for(const auto &path : paths) for(const auto &path : paths)
if(FMH::fileExists(path)) if(FMH::fileExists(QUrl::fromLocalFile(path)))
db->addFolder(path); db->addFolder(path);
uint newTracks = 0; uint newTracks = 0;
......
...@@ -76,7 +76,7 @@ QVariantList vvave::sourceFolders() ...@@ -76,7 +76,7 @@ QVariantList vvave::sourceFolders()
QVariantList res; QVariantList res;
for(const auto &item : sources) for(const auto &item : sources)
res << FMH::getDirInfo(item[FMH::MODEL_KEY::URL]); res << FMH::getDirInfo(QUrl::fromLocalFile(item[FMH::MODEL_KEY::URL]));
return res; return res;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment