Commit 3220fb1a authored by camilo higuita's avatar camilo higuita

needed changes for new mauikit kio based

parent 7c4a203b
Pipeline #6536 failed with stage
in 5 minutes and 7 seconds
......@@ -28,10 +28,10 @@ Cloud::Cloud(QObject *parent) : BaseList (parent)
newItem[FMH::MODEL_KEY::FAV] = QString("0");
newItem[FMH::MODEL_KEY::RATE] = QString("0");
newItem[FMH::MODEL_KEY::URL] = FMH::fileExists(thumbnail)? thumbnail : item[FMH::MODEL_KEY::URL];
newItem[FMH::MODEL_KEY::SOURCE] = FMH::fileExists(thumbnail)? thumbnail : item[FMH::MODEL_KEY::PATH];
newItem[FMH::MODEL_KEY::URL] = FMH::fileExists(QUrl::fromLocalFile(thumbnail))? thumbnail : item[FMH::MODEL_KEY::URL];
newItem[FMH::MODEL_KEY::SOURCE] = FMH::fileExists(QUrl::fromLocalFile(thumbnail))? thumbnail : item[FMH::MODEL_KEY::PATH];
if(FMH::fileExists(thumbnail))
if(FMH::fileExists(QUrl::fromLocalFile(thumbnail)))
{
qDebug()<< "file exists:" << thumbnail;
TagInfo info;
......@@ -61,10 +61,10 @@ Cloud::Cloud(QObject *parent) : BaseList (parent)
newItem[FMH::MODEL_KEY::FAV] = QString("0");
newItem[FMH::MODEL_KEY::RATE] = QString("0");
newItem[FMH::MODEL_KEY::URL] = FMH::fileExists(thumbnail)? thumbnail : item[FMH::MODEL_KEY::URL];
newItem[FMH::MODEL_KEY::SOURCE] = FMH::fileExists(thumbnail)? thumbnail : item[FMH::MODEL_KEY::PATH];
newItem[FMH::MODEL_KEY::URL] = FMH::fileExists(QUrl::fromLocalFile(thumbnail))? thumbnail : item[FMH::MODEL_KEY::URL];
newItem[FMH::MODEL_KEY::SOURCE] = FMH::fileExists(QUrl::fromLocalFile(thumbnail))? thumbnail : item[FMH::MODEL_KEY::PATH];
if(FMH::fileExists(thumbnail))
if(FMH::fileExists(QUrl::fromLocalFile(thumbnail)))
{
qDebug()<< "file exists:" << thumbnail;
TagInfo info;
......@@ -122,12 +122,12 @@ void Cloud::formatList()
item[FMH::MODEL_KEY::FAV] = QString("0");
item[FMH::MODEL_KEY::RATE] = QString("0");
item[FMH::MODEL_KEY::URL] = FMH::fileExists(thumbnail)? thumbnail : item[FMH::MODEL_KEY::URL];
item[FMH::MODEL_KEY::SOURCE] = FMH::fileExists(thumbnail)? thumbnail : item[FMH::MODEL_KEY::PATH];
item[FMH::MODEL_KEY::URL] = FMH::fileExists(QUrl::fromLocalFile(thumbnail))? thumbnail : item[FMH::MODEL_KEY::URL];
item[FMH::MODEL_KEY::SOURCE] = FMH::fileExists(QUrl::fromLocalFile(thumbnail))? thumbnail : item[FMH::MODEL_KEY::PATH];
qDebug()<< "CLOUD FILE" << thumbnail;
if(FMH::fileExists(thumbnail))
if(FMH::fileExists(QUrl::fromLocalFile(thumbnail)))
{
qDebug()<< "file exists:" << thumbnail;
TagInfo info;
......
......@@ -8,7 +8,7 @@ function playTrack(index)
if(typeof(currentTrack) === "undefined") return
if(Maui.FM.fileExists(currentTrack.url))
if(Maui.FM.fileExists("file://" + currentTrack.url))
{
player.url = currentTrack.url;
player.playing = true
......
......@@ -392,7 +392,7 @@ inline QString fixString (const QString &str)
inline bool fileExists(const QString &url)
{
return FMH::fileExists(url);
return FMH::fileExists(QUrl::fromLocalFile(url));
}
inline BAE::TABLE albumType(const FMH::MODEL &albumMap)
......
......@@ -71,7 +71,7 @@ BabeTable
onPlay:
{
currentIndex = index
if(Maui.FM.fileExists(_cloudList.get(index).thumbnail))
if(Maui.FM.fileExists("file://" + _cloudList.get(index).thumbnail))
{
quickPlayTrack(index)
}else
......
......@@ -74,7 +74,7 @@ Item
function filter()
{
var where = "source = \""+currentFolder+"\""
var where = "source = \""+currentFolder.replace("file://", "")+"\""
_filterList.list.query = (Q.GET.tracksWhere_.arg(where))
}
......
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