Commit aa6f48f0 authored by camilo higuita's avatar camilo higuita

multiple fixes: make use of url for detecting local from other remote urls,...

multiple fixes: make use of url for detecting local from other remote urls, also better albums delegates and quick fixes
parent fd5a55e0
...@@ -255,7 +255,6 @@ Maui.ApplicationWindow ...@@ -255,7 +255,6 @@ Maui.ApplicationWindow
icon.color: _drawer.visible ? babeColor : Kirigami.Theme.textColor icon.color: _drawer.visible ? babeColor : Kirigami.Theme.textColor
onClicked: onClicked:
{ {
console.log("SHOW DRAWER?", _drawer.visible)
_drawer.visible = !_drawer.visible _drawer.visible = !_drawer.visible
} }
...@@ -635,8 +634,12 @@ Maui.ApplicationWindow ...@@ -635,8 +634,12 @@ Maui.ApplicationWindow
Layout.fillWidth: true Layout.fillWidth: true
interactive: isMobile interactive: isMobile
currentIndex: _actionGroup.currentIndex currentIndex: _actionGroup.currentIndex
onCurrentIndexChanged: _actionGroup.currentIndex = currentIndex
clip: true clip: true
onCurrentItemChanged: currentItem.forceActiveFocus() onCurrentItemChanged: currentItem.forceActiveFocus()
TracksView TracksView
{ {
id: tracksView id: tracksView
......
...@@ -58,37 +58,37 @@ void AlbumsModel::sortList() ...@@ -58,37 +58,37 @@ void AlbumsModel::sortList()
const auto role = key; const auto role = key;
switch(role) switch(role)
{ {
case FMH::MODEL_KEY::RELEASEDATE: case FMH::MODEL_KEY::RELEASEDATE:
{ {
if(e1[role].toDouble() > e2[role].toDouble()) if(e1[role].toDouble() > e2[role].toDouble())
return true; return true;
break; break;
} }
case FMH::MODEL_KEY::ADDDATE: case FMH::MODEL_KEY::ADDDATE:
{ {
const auto date1 = QDateTime::fromString(e1[role], Qt::TextDate); const auto date1 = QDateTime::fromString(e1[role], Qt::TextDate);
const auto date2 = QDateTime::fromString(e2[role], Qt::TextDate); const auto date2 = QDateTime::fromString(e2[role], Qt::TextDate);
if(date1.secsTo(QDateTime::currentDateTime()) < date2.secsTo(QDateTime::currentDateTime())) if(date1.secsTo(QDateTime::currentDateTime()) < date2.secsTo(QDateTime::currentDateTime()))
return true; return true;
break; break;
} }
case FMH::MODEL_KEY::ARTIST: case FMH::MODEL_KEY::ARTIST:
case FMH::MODEL_KEY::ALBUM: case FMH::MODEL_KEY::ALBUM:
{ {
const auto str1 = QString(e1[role]).toLower(); const auto str1 = QString(e1[role]).toLower();
const auto str2 = QString(e2[role]).toLower(); const auto str2 = QString(e2[role]).toLower();
if(str1 < str2) if(str1 < str2)
return true; return true;
break; break;
} }
default: default:
if(e1[role] < e2[role]) if(e1[role] < e2[role])
return true; return true;
} }
return false; return false;
...@@ -108,7 +108,10 @@ void AlbumsModel::setList() ...@@ -108,7 +108,10 @@ 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(QUrl::fromLocalFile(item[FMH::MODEL_KEY::ARTWORK]))) if(!item[FMH::MODEL_KEY::ARTWORK].isEmpty())
return;
if(QUrl(item[FMH::MODEL_KEY::ARTWORK]).isLocalFile() && !FMH::fileExists(item[FMH::MODEL_KEY::ARTWORK]))
{ {
this->db->removeArtwork(FMH::MODEL_NAME[static_cast<FMH::MODEL_KEY>(this->query)], FMH::toMap(item)); this->db->removeArtwork(FMH::MODEL_NAME[static_cast<FMH::MODEL_KEY>(this->query)], FMH::toMap(item));
item[FMH::MODEL_KEY::ARTWORK] = ""; item[FMH::MODEL_KEY::ARTWORK] = "";
...@@ -132,7 +135,7 @@ void AlbumsModel::fetchInformation() ...@@ -132,7 +135,7 @@ void AlbumsModel::fetchInformation()
stop = false; stop = false;
QList<PULPO::REQUEST> requests; QList<PULPO::REQUEST> requests;
int index = -1; int index = -1;
for(auto album : this->list) for(auto &album : this->list)
{ {
index++; index++;
if(!album[FMH::MODEL_KEY::ARTWORK].isEmpty()) if(!album[FMH::MODEL_KEY::ARTWORK].isEmpty())
...@@ -167,6 +170,10 @@ void AlbumsModel::fetchInformation() ...@@ -167,6 +170,10 @@ void AlbumsModel::fetchInformation()
newTrack[FMH::MODEL_KEY::ARTWORK] = path; newTrack[FMH::MODEL_KEY::ARTWORK] = path;
this->db->insertArtwork(newTrack); this->db->insertArtwork(newTrack);
this->updateArtwork(index, path); this->updateArtwork(index, path);
album[FMH::MODEL_KEY::ARTWORK] = path;
emit this->updateModel(index, {FMH::MODEL_KEY::ARTWORK});
downloader->deleteLater(); downloader->deleteLater();
}); });
......
...@@ -11,33 +11,34 @@ ...@@ -11,33 +11,34 @@
namespace FLoader namespace FLoader
{ {
inline QStringList getPathContents(QStringList &urls, const QString &path) inline QList<QUrl> getPathContents(QList<QUrl> &urls, const QUrl &url)
{ {
if(!FMH::fileExists(QUrl::fromLocalFile(path))) if(!FMH::fileExists(url) && !url.isLocalFile())
return urls; return urls;
if (QFileInfo(path).isDir()) if (QFileInfo(url.toLocalFile()).isDir())
{ {
QDirIterator it(path, QStringList() << FMH::FILTER_LIST[FMH::FILTER_TYPE::AUDIO] << "*.m4a", QDir::Files, QDirIterator::Subdirectories); QDirIterator it(url.toLocalFile(), QStringList() << FMH::FILTER_LIST[FMH::FILTER_TYPE::AUDIO] << "*.m4a", QDir::Files, QDirIterator::Subdirectories);
while (it.hasNext()) while (it.hasNext())
urls << it.next(); urls << QUrl::fromLocalFile(it.next());
}else if (QFileInfo(path).isFile()) }else if (QFileInfo(url.toLocalFile()).isFile())
urls << path; urls << url.toString();
return urls; return urls;
} }
// returns the number of new items added to the collection db // returns the number of new items added to the collection db
inline uint getTracks(const QStringList& paths) inline uint getTracks(const QList<QUrl>& paths)
{ {
qDebug()<< paths;
auto db = CollectionDB::getInstance(); auto db = CollectionDB::getInstance();
const auto urls = std::accumulate(paths.begin(), paths.end(), QStringList(), getPathContents); const auto urls = std::accumulate(paths.begin(), paths.end(), QList<QUrl>(), getPathContents);
for(const auto &path : paths) for(const auto &path : paths)
if(FMH::fileExists(QUrl::fromLocalFile(path))) if(path.isLocalFile() && FMH::fileExists(path))
db->addFolder(path); db->addFolder(path.toString());
uint newTracks = 0; uint newTracks = 0;
...@@ -47,10 +48,10 @@ inline uint getTracks(const QStringList& paths) ...@@ -47,10 +48,10 @@ inline uint getTracks(const QStringList& paths)
TagInfo info; TagInfo info;
for(const auto &url : urls) for(const auto &url : urls)
{ {
if(db->check_existance(BAE::TABLEMAP[BAE::TABLE::TRACKS], FMH::MODEL_NAME[FMH::MODEL_KEY::URL], url)) if(db->check_existance(BAE::TABLEMAP[BAE::TABLE::TRACKS], FMH::MODEL_NAME[FMH::MODEL_KEY::URL], url.toString()))
continue; continue;
if(!info.feed(url)) if(!info.feed(url.toLocalFile()))
continue; continue;
const auto track = info.getTrack(); const auto track = info.getTrack();
...@@ -58,13 +59,13 @@ inline uint getTracks(const QStringList& paths) ...@@ -58,13 +59,13 @@ inline uint getTracks(const QStringList& paths)
const auto album = BAE::fixString(info.getAlbum()); const auto album = BAE::fixString(info.getAlbum());
const auto title = BAE::fixString(info.getTitle()); /* to fix*/ const auto title = BAE::fixString(info.getTitle()); /* to fix*/
const auto artist = BAE::fixString(info.getArtist()); const auto artist = BAE::fixString(info.getArtist());
const auto sourceUrl = QFileInfo(url).dir().path(); const auto sourceUrl = FMH::parentDir(url).toString();
const auto duration = info.getDuration(); const auto duration = info.getDuration();
const auto year = info.getYear(); const auto year = info.getYear();
FMH::MODEL trackMap = FMH::MODEL trackMap =
{ {
{FMH::MODEL_KEY::URL, url}, {FMH::MODEL_KEY::URL, url.toString()},
{FMH::MODEL_KEY::TRACK, QString::number(track)}, {FMH::MODEL_KEY::TRACK, QString::number(track)},
{FMH::MODEL_KEY::TITLE, title}, {FMH::MODEL_KEY::TITLE, title},
{FMH::MODEL_KEY::ARTIST, artist}, {FMH::MODEL_KEY::ARTIST, artist},
...@@ -72,11 +73,10 @@ inline uint getTracks(const QStringList& paths) ...@@ -72,11 +73,10 @@ inline uint getTracks(const QStringList& paths)
{FMH::MODEL_KEY::DURATION,QString::number(duration)}, {FMH::MODEL_KEY::DURATION,QString::number(duration)},
{FMH::MODEL_KEY::GENRE, genre}, {FMH::MODEL_KEY::GENRE, genre},
{FMH::MODEL_KEY::SOURCE, sourceUrl}, {FMH::MODEL_KEY::SOURCE, sourceUrl},
{FMH::MODEL_KEY::FAV, url.startsWith(BAE::YoutubeCachePath) ? "1": "0"}, {FMH::MODEL_KEY::FAV, "0"},
{FMH::MODEL_KEY::RELEASEDATE, QString::number(year)} {FMH::MODEL_KEY::RELEASEDATE, QString::number(year)}
}; };
qDebug() << url;
BAE::artworkCache(trackMap, FMH::MODEL_KEY::ALBUM); BAE::artworkCache(trackMap, FMH::MODEL_KEY::ALBUM);
if(db->addTrack(trackMap)) if(db->addTrack(trackMap))
......
...@@ -104,7 +104,7 @@ void Player::setUrl(const QString &value) ...@@ -104,7 +104,7 @@ void Player::setUrl(const QString &value)
this->pos = 0; this->pos = 0;
emit this->posChanged(); emit this->posChanged();
const auto media = QMediaContent(QUrl::fromLocalFile(this->url)); const auto media = QMediaContent(this->url);
this->player->setMedia(media); this->player->setMedia(media);
this->emitState(); this->emitState();
} }
......
...@@ -8,7 +8,7 @@ function playTrack(index) ...@@ -8,7 +8,7 @@ function playTrack(index)
if(typeof(currentTrack) === "undefined") return if(typeof(currentTrack) === "undefined") return
if(Maui.FM.fileExists("file://" + currentTrack.url)) if(Maui.FM.fileExists(currentTrack.url))
{ {
player.url = currentTrack.url; player.url = currentTrack.url;
player.playing = true player.playing = true
...@@ -19,14 +19,11 @@ function playTrack(index) ...@@ -19,14 +19,11 @@ function playTrack(index)
// else bae.loadCover(currentTrack.url) // else bae.loadCover(currentTrack.url)
progressBar.enabled = true progressBar.enabled = true
root.title = currentTrack.title + " - " +currentTrack.artist
if(!isMobile)
{
root.title = currentTrack.title + " - " +currentTrack.artist
// if(!root.active) // if(!root.active)
// bae.notifySong(currentTrack.url) // bae.notifySong(currentTrack.url)
}
// if(currentTrack.lyrics.length < 1) // if(currentTrack.lyrics.length < 1)
// bae.trackLyrics(currentTrack.url) // bae.trackLyrics(currentTrack.url)
......
...@@ -259,9 +259,6 @@ const QString CachePath = QStandardPaths::writableLocation(QStandardPaths::Gener ...@@ -259,9 +259,6 @@ const QString CachePath = QStandardPaths::writableLocation(QStandardPaths::Gener
const QString YoutubeCachePath = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)+"/vvave/youtube/"; const QString YoutubeCachePath = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)+"/vvave/youtube/";
const QString NotifyDir = SettingPath; const QString NotifyDir = SettingPath;
const QStringList MusicPaths = QStandardPaths::standardLocations(QStandardPaths::MusicLocation);
const QStringList DownloadsPaths = QStandardPaths::standardLocations(QStandardPaths::DownloadLocation);
const QString MusicPath = FMH::MusicPath; const QString MusicPath = FMH::MusicPath;
const QString HomePath = FMH::HomePath; const QString HomePath = FMH::HomePath;
const QString DownloadsPath = FMH::DownloadsPath; const QString DownloadsPath = FMH::DownloadsPath;
...@@ -281,8 +278,6 @@ const QString DBName = "collection.db"; ...@@ -281,8 +278,6 @@ const QString DBName = "collection.db";
const QStringList MoodColors = {"#F0FF01","#01FF5B","#3DAEFD","#B401FF","#E91E63"}; const QStringList MoodColors = {"#F0FF01","#01FF5B","#3DAEFD","#B401FF","#E91E63"};
const QStringList defaultSources = QStringList() << BAE::MusicPath const QStringList defaultSources = QStringList() << BAE::MusicPath
<< BAE::DownloadsPath << BAE::DownloadsPath
<< BAE::MusicPaths
<< BAE::DownloadsPaths
<< BAE::YoutubeCachePath; << BAE::YoutubeCachePath;
inline QString fixTitle(const QString &title,const QString &s,const QString &e) inline QString fixTitle(const QString &title,const QString &s,const QString &e)
...@@ -419,14 +414,14 @@ inline bool artworkCache(FMH::MODEL &track, const FMH::MODEL_KEY &type = FMH::MO ...@@ -419,14 +414,14 @@ inline bool artworkCache(FMH::MODEL &track, const FMH::MODEL_KEY &type = FMH::MO
QDirIterator it(CachePath, QDir::Files, QDirIterator::NoIteratorFlags); QDirIterator it(CachePath, QDir::Files, QDirIterator::NoIteratorFlags);
while (it.hasNext()) while (it.hasNext())
{ {
const auto file = it.next(); const auto file = QUrl::fromLocalFile(it.next());
const auto fileName = QFileInfo(file).baseName(); const auto fileName = QFileInfo(file.toLocalFile()).baseName();
switch(type) switch(type)
{ {
case FMH::MODEL_KEY::ALBUM: case FMH::MODEL_KEY::ALBUM:
if(fileName == (track[FMH::MODEL_KEY::ARTIST]+"_"+track[FMH::MODEL_KEY::ALBUM])) if(fileName == (track[FMH::MODEL_KEY::ARTIST]+"_"+track[FMH::MODEL_KEY::ALBUM]))
{ {
track.insert(FMH::MODEL_KEY::ARTWORK, file); track.insert(FMH::MODEL_KEY::ARTWORK, file.toString());
return true; return true;
} }
break; break;
...@@ -434,7 +429,7 @@ inline bool artworkCache(FMH::MODEL &track, const FMH::MODEL_KEY &type = FMH::MO ...@@ -434,7 +429,7 @@ inline bool artworkCache(FMH::MODEL &track, const FMH::MODEL_KEY &type = FMH::MO
case FMH::MODEL_KEY::ARTIST: case FMH::MODEL_KEY::ARTIST:
if(fileName == (track[FMH::MODEL_KEY::ARTIST])) if(fileName == (track[FMH::MODEL_KEY::ARTIST]))
{ {
track.insert(FMH::MODEL_KEY::ARTWORK, file); track.insert(FMH::MODEL_KEY::ARTWORK, file.toString());
return true; return true;
} }
break; break;
......
...@@ -81,7 +81,7 @@ Maui.ItemDelegate ...@@ -81,7 +81,7 @@ Maui.ItemDelegate
source: source:
{ {
if(artwork) if(artwork)
(artwork.length > 0 && artwork !== "NONE")? "file://"+encodeURIComponent(artwork) : "qrc:/assets/cover.png" (artwork.length > 0 && artwork !== "NONE")? artwork : "qrc:/assets/cover.png"
else "qrc:/assets/cover.png" else "qrc:/assets/cover.png"
} }
layer.enabled: albumRadius layer.enabled: albumRadius
...@@ -159,6 +159,32 @@ Maui.ItemDelegate ...@@ -159,6 +159,32 @@ Maui.ItemDelegate
opacity: 0.2 opacity: 0.2
} }
layer.enabled: true
layer.effect: OpacityMask
{
maskSource: Item
{
width: blur.width
height: blur.height
Rectangle
{
anchors.centerIn: parent
width: parent.width
height: parent.height
radius: albumRadius
Rectangle
{
anchors.top: parent.top
width: parent.width
height: parent.radius
}
}
}
}
} }
...@@ -189,7 +215,7 @@ Maui.ItemDelegate ...@@ -189,7 +215,7 @@ Maui.ItemDelegate
Layout.fillWidth: visible Layout.fillWidth: visible
Layout.fillHeight: visible Layout.fillHeight: visible
text: list.query === Albums.ALBUMS ? model.artist : undefined text: list.query === Albums.ALBUMS ? model.artist : ""
visible: text && (control.width > 70) visible: text && (control.width > 70)
horizontalAlignment: Qt.AlignLeft horizontalAlignment: Qt.AlignLeft
elide: Text.ElideRight elide: Text.ElideRight
......
...@@ -92,7 +92,7 @@ Menu ...@@ -92,7 +92,7 @@ Menu
MenuItem MenuItem
{ {
visible: root.showAccounts visible: Maui.App.handleAccounts
text: qsTr("Copy to cloud") text: qsTr("Copy to cloud")
onTriggered: onTriggered:
{ {
......
...@@ -57,13 +57,7 @@ void vvave::checkCollection(const QStringList &paths, std::function<void(uint)> ...@@ -57,13 +57,7 @@ void vvave::checkCollection(const QStringList &paths, std::function<void(uint)>
const auto func = [=]() -> uint const auto func = [=]() -> uint
{ {
auto newPaths = paths; return FLoader::getTracks(QUrl::fromStringList(paths));
for(auto path : newPaths)
if(path.startsWith("file://"))
path.replace("file://", "");
return FLoader::getTracks(newPaths);
}; };
QFuture<uint> t1 = QtConcurrent::run(func); QFuture<uint> t1 = QtConcurrent::run(func);
...@@ -82,7 +76,7 @@ QVariantList vvave::sourceFolders() ...@@ -82,7 +76,7 @@ QVariantList vvave::sourceFolders()
QVariantList res; QVariantList res;
for(const auto &item : sources) for(const auto &item : sources)
res << FMH::getDirInfo(QUrl::fromLocalFile(item[FMH::MODEL_KEY::URL])); res << FMH::getDirInfo(item[FMH::MODEL_KEY::URL]);
return res; return res;
} }
......
...@@ -98,6 +98,7 @@ BabeGrid ...@@ -98,6 +98,7 @@ BabeGrid
Maui.Dialog Maui.Dialog
{ {
id: albumDialog id: albumDialog
property string title
parent: parent parent: parent
maxHeight: maxWidth maxHeight: maxWidth
maxWidth: Maui.Style.unit * 600 maxWidth: Maui.Style.unit * 600
...@@ -105,7 +106,8 @@ BabeGrid ...@@ -105,7 +106,8 @@ BabeGrid
heightHint: 0.9 heightHint: 0.9
defaultButtons: false defaultButtons: false
page.padding: 0 page.padding: 0
headBar.visible: true
page.title: title
ColumnLayout ColumnLayout
{ {
id: albumFilter id: albumFilter
...@@ -115,6 +117,7 @@ BabeGrid ...@@ -115,6 +117,7 @@ BabeGrid
BabeTable BabeTable
{ {
id: albumsViewTable id: albumsViewTable
headBar.position: ToolBar.Footer
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
trackNumberVisible: true trackNumberVisible: true
...@@ -185,13 +188,13 @@ BabeGrid ...@@ -185,13 +188,13 @@ BabeGrid
{ {
query = Q.GET.albumTracks_.arg(album) query = Q.GET.albumTracks_.arg(album)
query = query.arg(artist) query = query.arg(artist)
albumsView.table.title = album albumDialog.title = album
tagq = Q.GET.albumTags_.arg(album) tagq = Q.GET.albumTags_.arg(album)
}else if(artist && album === undefined) }else if(artist && album === undefined)
{ {
query = Q.GET.artistTracks_.arg(artist) query = Q.GET.artistTracks_.arg(artist)
artistsView.table.title = artist albumDialog.title = artist
tagq = Q.GET.artistTags_.arg(artist) tagq = Q.GET.artistTags_.arg(artist)
} }
......
...@@ -74,7 +74,7 @@ Item ...@@ -74,7 +74,7 @@ Item
function filter() function filter()
{ {
var where = "source = \""+currentFolder.replace("file://", "")+"\"" var where = "source = \""+currentFolder+"\""
_filterList.list.query = (Q.GET.tracksWhere_.arg(where)) _filterList.list.query = (Q.GET.tracksWhere_.arg(where))
} }
......
...@@ -35,7 +35,6 @@ Maui.Page ...@@ -35,7 +35,6 @@ Maui.Page
{ {
id: playlistMenu id: playlistMenu
onClearOut: Player.clearOutPlaylist() onClearOut: Player.clearOutPlaylist()
// onHideCover: cover.visible = !cover.visible
onClean: Player.cleanPlaylist() onClean: Player.cleanPlaylist()
onSaveToClicked: table.saveList() onSaveToClicked: table.saveList()
} }
...@@ -45,20 +44,17 @@ Maui.Page ...@@ -45,20 +44,17 @@ Maui.Page
footBar.width: parent.width footBar.width: parent.width
footBar.middleContent: AlbumsRoll footBar.middleContent: AlbumsRoll
{ {
// height: Maui.Style.toolBarHeight * 1.3
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
// width: footBar.width
// height: footBar.height
id: albumsRoll id: albumsRoll
} }
footBar.background: Item footBar.background: Item
{ {
id: footerBg id: footerBg
clip : true
height: footBar.implicitHeight height: footBar.implicitHeight
Image Image
{ {
id: artworkBg id: artworkBg
...@@ -73,7 +69,7 @@ Maui.Page ...@@ -73,7 +69,7 @@ Maui.Page
smooth: true smooth: true
asynchronous: true asynchronous: true
source: "file://"+encodeURIComponent(currentArtwork) source: currentArtwork
} }
FastBlur FastBlur
...@@ -88,13 +84,28 @@ Maui.Page ...@@ -88,13 +84,28 @@ Maui.Page
z:1 z:1
clip: true clip: true
Rectangle LinearGradient
{ {
anchors.fill: parent anchors.fill: parent
color: Kirigami.Theme.viewBackgroundColor start: Qt.point(0, 0)
opacity: 0.85 end: Qt.point(0, parent.height)
} gradient: Gradient {
GradientStop { position: 0; color: Kirigami.Theme.viewBackgroundColor }
GradientStop { position: 1; color: "transparent" }
}
Rectangle
{
anchors.fill: parent
color: Kirigami.Theme.viewBackgroundColor
opacity: 0.7
}
}
} }
} }
BabeTable BabeTable
......
...@@ -69,7 +69,7 @@ ColumnLayout ...@@ -69,7 +69,7 @@ ColumnLayout
{ {
Layout.fillWidth: true Layout.fillWidth: true
height: Maui.Style.rowHeightAlt height: Maui.Style.rowHeightAlt
recSize: Kirigami.Settings.isMobile ? iconSize : 16 recSize: Kirigami.Settings.isMobile ? Maui.Style.iconSizes.medium : Maui.Style.iconSizes.small
onColorClicked: populate(Q.GET.colorTracks_.arg(color.toLowerCase())) onColorClicked: populate(Q.GET.colorTracks_.arg(color.toLowerCase()))
} }
...@@ -95,7 +95,7 @@ ColumnLayout ...@@ -95,7 +95,7 @@ ColumnLayout
title: playlistViewModel.list.get(playlistViewModel.currentIndex).playlist title: playlistViewModel.list.get(playlistViewModel.currentIndex).playlist
holder.emoji: "qrc:/assets/Electricity.png" holder.emoji: "qrc:/assets/Electricity.png"
holder.isMask: false holder.isMask: false
holder.title : playlistViewModel.model.get(playlistViewModel.currentIndex).playlist holder.title : playlistViewModel.list.get(playlistViewModel.currentIndex).playlist
holder.body: "Your playlist is empty,<br>start adding new music to it" holder.body: "Your playlist is empty,<br>start adding new music to it"
holder.emojiSize: Maui.Style.iconSizes.huge holder.emojiSize: Maui.Style.iconSizes.huge
...@@ -212,6 +212,5 @@ ColumnLayout ...@@ -212,6 +212,5 @@ ColumnLayout
function removePlaylist() function removePlaylist()
{ {
playlistList.removePlaylist(playlistViewList.currentIndex) playlistList.removePlaylist(playlistViewList.currentIndex)
filterList.clearTable()
} }
} }
...@@ -29,27 +29,24 @@ BabeList ...@@ -29,27 +29,24 @@ BabeList
rejectButton.visible: false rejectButton.visible: false
} }