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()
//get albums data with modifier for missing images for artworks
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));
item[FMH::MODEL_KEY::ARTWORK] = "";
......
......@@ -3,6 +3,7 @@
#include <QObject>
#include <QDirIterator>
#include <QUrl>
#include "../services/local/taginfo.h"
#include "../db/collectionDB.h"
#include "utils/bae.h"
......@@ -12,7 +13,7 @@ namespace FLoader
inline QStringList getPathContents(QStringList &urls, const QString &path)
{
if(!FMH::fileExists(path))
if(!FMH::fileExists(QUrl::fromLocalFile(path)))
return urls;
if (QFileInfo(path).isDir())
......@@ -35,7 +36,7 @@ inline uint getTracks(const QStringList& paths)
const auto urls = std::accumulate(paths.begin(), paths.end(), QStringList(), getPathContents);
for(const auto &path : paths)
if(FMH::fileExists(path))
if(FMH::fileExists(QUrl::fromLocalFile(path)))
db->addFolder(path);
uint newTracks = 0;
......
......@@ -76,7 +76,7 @@ QVariantList vvave::sourceFolders()
QVariantList res;
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;
}
......
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