Commit 27efc7cd authored by camilo higuita's avatar camilo higuita

now ready for first stable release

parent 3f1537d0
......@@ -1010,26 +1010,26 @@ Maui.ApplicationWindow
onRefreshAlbums: H.refreshAlbums()
onRefreshArtists: H.refreshArtists()
onCoverReady:
{
root.currentArtwork = path
currentTrack.artwork = currentArtwork
mainPlaylist.list.update(currentTrack, currentTrackIndex);
}
onTrackLyricsReady:
{
console.log(lyrics)
if (url === currentTrack.url)
Player.setLyrics(lyrics)
}
onSkipTrack: Player.nextTrack()
onBabeIt: if (!mainlistEmpty)
{
mainPlaylist.list.fav(currentTrackIndex, !(mainPlaylist.list.get(currentTrackIndex).fav == "1"))
currentBabe = mainPlaylist.list.get(currentTrackIndex).fav == "1"
}
// onCoverReady:
// {
// root.currentArtwork = path
// currentTrack.artwork = currentArtwork
// mainPlaylist.list.update(currentTrack, currentTrackIndex);
// }
// onTrackLyricsReady:
// {
// console.log(lyrics)
// if (url === currentTrack.url)
// Player.setLyrics(lyrics)
// }
// onSkipTrack: Player.nextTrack()
// onBabeIt: if (!mainlistEmpty)
// {
// mainPlaylist.list.fav(currentTrackIndex, !(mainPlaylist.list.get(currentTrackIndex).fav == "1"))
// currentBabe = mainPlaylist.list.get(currentTrackIndex).fav == "1"
// }
onOpenFiles:
{
......
......@@ -192,20 +192,18 @@ void AlbumsModel::fetchInformation()
QEventLoop loop;
QObject::connect(&pulpo, &Pulpo::finished, &loop, &QEventLoop::quit);
bool stop = false;
// QObject::connect(qApp, &QCoreApplication::aboutToQuit, [&]()
// {
// stop = true;
// loop.quit();
// });
QObject::connect(this, &AlbumsModel::destroyed, [&]()
{
qDebug()<< stop << &stop;
stop = true;
qDebug()<< stop << &stop;
});
for(auto i = 0; i < requests.size(); i++)
for(const auto &req : requests)
{
pulpo.request(requests.at(i));
pulpo.request(req);
loop.exec();
if(stop)
{
......@@ -232,14 +230,7 @@ QVariantMap AlbumsModel::get(const int &index) const
{
if(index >= this->list.size() || index < 0)
return QVariantMap();
QVariantMap res;
const auto item = this->list.at(index);
for(auto key : item.keys())
res.insert(FMH::MODEL_NAME[key], item[key]);
return res;
return FM::toMap(this->list.at(index));
}
void AlbumsModel::append(const QVariantMap &item)
......@@ -283,5 +274,3 @@ void AlbumsModel::refresh()
{
this->setList();
}
......@@ -157,14 +157,7 @@ QVariantMap PlaylistsModel::get(const int &index) const
{
if(index >= this->list.size() || index < 0)
return QVariantMap();
QVariantMap res;
const auto item = this->list.at(index);
for(auto key : item.keys())
res.insert(FMH::MODEL_NAME[key], item[key]);
return res;
return FM::toMap(this->list.at(index));
}
void PlaylistsModel::append(const QVariantMap &item)
......
......@@ -127,14 +127,7 @@ QVariantMap TracksModel::get(const int &index) const
{
if(index >= this->list.size() || index < 0)
return QVariantMap();
QVariantMap res;
const auto item = this->list.at(index);
for(auto key : item.keys())
res.insert(FMH::MODEL_NAME[key], item[key]);
return res;
return FM::toMap(this->list.at(index));
}
QVariantList TracksModel::getAll()
......
......@@ -321,7 +321,7 @@ BabeList
number : trackNumberVisible ? true : false
quickPlay: quickPlayVisible
coverArt : coverArtVisible
coverArt : coverArtVisible ? (babeTableRoot.width > 300) : coverArtVisible
trackDurationVisible : trackDuration
trackRatingVisible : trackRating
menuItem: menuItemVisible
......
......@@ -31,7 +31,6 @@ vvave::vvave(QObject *parent) : QObject(parent)
for(const auto &path : {BAE::CachePath, BAE::YoutubeCachePath})
{
QDir dirPath(path);
if (!dirPath.exists())
dirPath.mkpath(".");
}
......@@ -81,7 +80,6 @@ void vvave::checkCollection(const QStringList &paths, std::function<void(uint)>
watcher->setFuture(t1);
}
//// PUBLIC SLOTS
QVariantList vvave::sourceFolders()
{
......
......@@ -130,6 +130,7 @@ BabeGrid
Layout.fillHeight: true
Layout.fillWidth: true
trackNumberVisible: true
trackRating: true
headBar.visible: true
headBarExit: false
coverArtVisible: true
......
......@@ -6,13 +6,14 @@ import "../db/Queries.js" as Q
Item
{
id: control
property alias list : _filterList
property var tracks : []
property string currentFolder : ""
Maui.GridBrowser
{
id: browser
property alias list : _filterList
property var tracks : []
property string currentFolder : ""
// headBarTitle: qsTr("Source folders")
anchors.margins: space.big
anchors.fill: parent
......@@ -60,23 +61,23 @@ Item
holder.emojiSize: iconSizes.huge
}
}
}
Component.onCompleted: populate()
Component.onCompleted: populate()
function populate()
{
browser.model.clear()
var folders = vvave.sourceFolders();
if(folders.length > 0)
for(var i in folders)
browser.model.append(folders[i])
}
function populate()
{
browser.model.clear()
var folders = vvave.sourceFolders();
if(folders.length > 0)
for(var i in folders)
browser.model.append(folders[i])
}
function filter()
{
var where = "source = \""+currentFolder+"\""
_filterList.list.query = (Q.GET.tracksWhere_.arg(where))
function filter()
{
var where = "source = \""+currentFolder+"\""
_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