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
ab7a2405
Commit
ab7a2405
authored
Jun 22, 2019
by
camilo higuita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
7d066a15
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
main.cpp
main.cpp
+1
-2
models/albums/albumsmodel.cpp
models/albums/albumsmodel.cpp
+5
-4
models/albums/albumsmodel.h
models/albums/albumsmodel.h
+2
-1
utils/Help.js
utils/Help.js
+2
-0
vvave.cpp
vvave.cpp
+1
-3
widgets/SettingsView/SourcesDialog.qml
widgets/SettingsView/SourcesDialog.qml
+0
-1
No files found.
main.cpp
View file @
ab7a2405
...
...
@@ -85,8 +85,7 @@ int main(int argc, char *argv[])
{
qDebug
()
<<
"FINISHED LOADING QML APP"
;
const
auto
currentSources
=
vvave
.
getSourceFolders
();
const
QStringList
sources
=
currentSources
.
isEmpty
()
?
BAE
::
defaultSources
:
currentSources
;
vvave
.
scanDir
(
sources
);
vvave
.
scanDir
(
currentSources
.
isEmpty
()
?
BAE
::
defaultSources
:
currentSources
);
if
(
!
urls
.
isEmpty
())
vvave
.
openUrls
(
urls
);
});
...
...
models/albums/albumsmodel.cpp
View file @
ab7a2405
...
...
@@ -120,12 +120,13 @@ void AlbumsModel::setList()
this
->
sortList
();
emit
this
->
postListChanged
();
if
(
this
->
query
==
AlbumsModel
::
QUERY
::
ALBUMS
)
this
->
runBrain
();
}
void
AlbumsModel
::
runBrai
n
()
void
AlbumsModel
::
fetchInformatio
n
()
{
qDebug
()
<<
"RNUNGING BRAIN EFFORRTS"
;
QFutureWatcher
<
void
>
*
watcher
=
new
QFutureWatcher
<
void
>
;
QObject
::
connect
(
watcher
,
&
QFutureWatcher
<
void
>::
finished
,
[
=
]()
...
...
@@ -152,7 +153,7 @@ void AlbumsModel::runBrain()
PULPO
::
REQUEST
request
;
request
.
track
=
album
;
request
.
ontology
=
PULPO
::
ONTOLOGY
::
ALBUM
;
request
.
ontology
=
this
->
query
==
AlbumsModel
::
QUERY
::
ALBUMS
?
PULPO
::
ONTOLOGY
::
ALBUM
:
PULPO
::
ONTOLOGY
::
ARTIST
;
request
.
services
=
{
PULPO
::
SERVICES
::
LastFm
,
PULPO
::
SERVICES
::
Spotify
,
PULPO
::
SERVICES
::
MusicBrainz
};
request
.
info
=
{
PULPO
::
INFO
::
ARTWORK
};
request
.
callback
=
[
=
](
PULPO
::
REQUEST
request
,
PULPO
::
RESPONSES
responses
)
...
...
models/albums/albumsmodel.h
View file @
ab7a2405
...
...
@@ -48,7 +48,6 @@ private:
AlbumsModel
::
QUERY
query
;
AlbumsModel
::
SORTBY
sort
=
AlbumsModel
::
SORTBY
::
ADDDATE
;
void
runBrain
();
void
updateArtwork
(
const
int
index
,
const
QString
&
artwork
);
signals:
...
...
@@ -60,6 +59,8 @@ public slots:
void
append
(
const
QVariantMap
&
item
);
void
append
(
const
QVariantMap
&
item
,
const
int
&
at
);
void
refresh
();
void
fetchInformation
();
};
#endif // ALBUMSMODEL_H
utils/Help.js
View file @
ab7a2405
...
...
@@ -52,6 +52,7 @@ function refreshCollection(size)
refreshArtists
()
refreshFolders
()
}
function
refreshFolders
()
{
foldersView
.
populate
()
...
...
@@ -65,6 +66,7 @@ function refreshTracks()
function
refreshAlbums
()
{
albumsView
.
list
.
refresh
()
albumsView
.
list
.
fetchInformation
();
}
function
refreshArtists
()
...
...
vvave.cpp
View file @
ab7a2405
...
...
@@ -83,7 +83,6 @@ void vvave::checkCollection(const QStringList &paths, std::function<void(uint)>
//// PUBLIC SLOTS
QVariantList
vvave
::
sourceFolders
()
{
const
auto
sources
=
this
->
db
->
getDBData
(
"select * from sources"
);
...
...
@@ -124,8 +123,7 @@ void vvave::openUrls(const QStringList &urls)
for
(
QString
url
:
urls
)
if
(
db
->
check_existance
(
BAE
::
TABLEMAP
[
BAE
::
TABLE
::
TRACKS
],
FMH
::
MODEL_NAME
[
FMH
::
MODEL_KEY
::
URL
],
url
))
{
const
auto
value
=
this
->
db
->
getDBData
(
QStringList
()
<<
url
).
first
();
data
<<
FM
::
toMap
(
value
);
data
<<
FM
::
toMap
(
this
->
db
->
getDBData
(
QStringList
()
<<
url
).
first
());
}
else
{
...
...
widgets/SettingsView/SourcesDialog.qml
View file @
ab7a2405
...
...
@@ -110,7 +110,6 @@ Maui.Dialog
{
sources
.
model
.
clear
()
var
folders
=
vvave
.
getSourceFolders
()
console
.
log
(
folders
)
for
(
var
i
in
folders
)
sources
.
model
.
append
({
url
:
folders
[
i
]})
}
...
...
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