Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Vvave
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maui
Vvave
Commits
27efc7cd
Commit
27efc7cd
authored
Jun 24, 2019
by
camilo higuita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
now ready for first stable release
parent
3f1537d0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
75 deletions
+50
-75
main.qml
main.qml
+20
-20
models/albums/albumsmodel.cpp
models/albums/albumsmodel.cpp
+7
-18
models/playlists/playlistsmodel.cpp
models/playlists/playlistsmodel.cpp
+1
-8
models/tracks/tracksmodel.cpp
models/tracks/tracksmodel.cpp
+1
-8
view_models/BabeTable/BabeTable.qml
view_models/BabeTable/BabeTable.qml
+1
-1
vvave.cpp
vvave.cpp
+0
-2
widgets/AlbumsView.qml
widgets/AlbumsView.qml
+1
-0
widgets/FoldersView.qml
widgets/FoldersView.qml
+19
-18
No files found.
main.qml
View file @
27efc7cd
...
...
@@ -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
:
{
...
...
models/albums/albumsmodel.cpp
View file @
27efc7cd
...
...
@@ -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
(
req
uests
.
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
();
}
models/playlists/playlistsmodel.cpp
View file @
27efc7cd
...
...
@@ -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
)
...
...
models/tracks/tracksmodel.cpp
View file @
27efc7cd
...
...
@@ -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
()
...
...
view_models/BabeTable/BabeTable.qml
View file @
27efc7cd
...
...
@@ -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
...
...
vvave.cpp
View file @
27efc7cd
...
...
@@ -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
()
{
...
...
widgets/AlbumsView.qml
View file @
27efc7cd
...
...
@@ -130,6 +130,7 @@ BabeGrid
Layout.fillHeight
:
true
Layout.fillWidth
:
true
trackNumberVisible
:
true
trackRating
:
true
headBar.visible
:
true
headBarExit
:
false
coverArtVisible
:
true
...
...
widgets/FoldersView.qml
View file @
27efc7cd
...
...
@@ -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
))
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment