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
b45ef222
Commit
b45ef222
authored
Jun 19, 2019
by
camilo higuita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quick needed fixes for appimage creation
parent
95353d47
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
90 additions
and
53 deletions
+90
-53
CMakeLists.txt
CMakeLists.txt
+2
-2
main.qml
main.qml
+2
-0
models/playlists/playlistsmodel.cpp
models/playlists/playlistsmodel.cpp
+21
-0
models/playlists/playlistsmodel.h
models/playlists/playlistsmodel.h
+2
-0
utils/Player.js
utils/Player.js
+5
-4
view_models/BabeTable/BabeTable.qml
view_models/BabeTable/BabeTable.qml
+2
-2
vvave.cpp
vvave.cpp
+10
-0
vvave.h
vvave.h
+6
-0
widgets/PlaylistsView/PlaylistsView.qml
widgets/PlaylistsView/PlaylistsView.qml
+38
-43
widgets/SettingsView/SourcesDialog.qml
widgets/SettingsView/SourcesDialog.qml
+2
-2
No files found.
CMakeLists.txt
View file @
b45ef222
...
...
@@ -42,8 +42,8 @@ add_executable(vvave
db/conthread.cpp
db/collectionDB.cpp
# settings/BabeSettings.cpp
settings/fileloader.cpp
utils/brain.cpp
#
settings/fileloader.cpp
#
utils/brain.cpp
utils/babeconsole.cpp
models/tracks/tracksmodel.cpp
models/basemodel.cpp
...
...
main.qml
View file @
b45ef222
...
...
@@ -917,6 +917,8 @@ Maui.ApplicationWindow
Layout.bottomMargin
:
space
.
big
onIconClicked
:
_contextMenu
.
popup
()
onExitClicked
:
clear
()
colorScheme.backgroundColor
:
"
#212121
"
model
:
BaseModel
{
list
:
_selectionBarModelList
...
...
models/playlists/playlistsmodel.cpp
View file @
b45ef222
...
...
@@ -241,3 +241,24 @@ void PlaylistsModel::addTrack(const int &index, const QStringList &urls)
for
(
auto
url
:
urls
)
this
->
db
->
trackPlaylist
(
url
,
this
->
list
[
index
][
FMH
::
MODEL_KEY
::
PLAYLIST
]);
}
void
PlaylistsModel
::
removeTrack
(
const
int
&
index
,
const
QString
&
url
)
{
if
(
index
>=
this
->
list
.
size
()
||
index
<
0
)
return
;
this
->
db
->
removePlaylistTrack
(
url
,
this
->
list
.
at
(
index
)[
FMH
::
MODEL_KEY
::
PLAYLIST
]);
}
void
PlaylistsModel
::
removePlaylist
(
const
int
&
index
)
{
if
(
index
>=
this
->
list
.
size
()
||
index
<
0
)
return
;
if
(
this
->
db
->
removePlaylist
(
this
->
list
.
at
(
index
)[
FMH
::
MODEL_KEY
::
PLAYLIST
]))
{
emit
this
->
preItemRemoved
(
index
);
this
->
list
.
removeAt
(
index
);
emit
this
->
postItemRemoved
();
}
}
models/playlists/playlistsmodel.h
View file @
b45ef222
...
...
@@ -46,6 +46,8 @@ public slots:
void
insert
(
const
QString
&
playlist
);
void
insertAt
(
const
QString
&
playlist
,
const
int
&
at
);
void
addTrack
(
const
int
&
index
,
const
QStringList
&
urls
);
void
removeTrack
(
const
int
&
index
,
const
QString
&
url
);
void
removePlaylist
(
const
int
&
index
);
};
#endif // PLAYLISTSMODEL_H
utils/Player.js
View file @
b45ef222
...
...
@@ -18,7 +18,7 @@ function playTrack(index)
currentArtwork
=
currentTrack
.
artwork
else
bae
.
loadCover
(
currentTrack
.
url
)
progressBar
.
enabled
=
true
progressBar
.
enabled
=
true
if
(
!
isMobile
)
{
...
...
@@ -29,7 +29,7 @@ function playTrack(index)
}
// if(currentTrack.lyrics.length < 1)
bae
.
trackLyrics
(
currentTrack
.
url
)
//
bae.trackLyrics(currentTrack.url)
// root.mainPlaylist.infoView.wikiAlbum = bae.albumWiki(root.mainPlaylist.currentTrack.album,root.mainPlaylist.currentTrack.artist)
// root.mainPlaylist.infoView.wikiArtist = bae.artistWiki(root.mainPlaylist.currentTrack.artist)
...
...
@@ -199,10 +199,11 @@ function savePlaylist()
list
.
push
(
url
)
}
bae
.
savePlaylist
(
list
)
bae
.
savePlaylistPos
(
mainPlaylist
.
listView
.
currentIndex
)
Maui
.
FM
.
saveSettings
(
"
LASTPLAYLIST
"
,
list
,
"
PLAYLIST
"
);
Maui
.
FM
.
saveSettings
(
"
PLAYLIST_POS
"
,
mainPlaylist
.
listView
.
currentIndex
,
"
MAINWINDOW
"
)
}
function
clearOutPlaylist
()
{
mainPlaylist
.
list
.
clear
()
...
...
view_models/BabeTable/BabeTable.qml
View file @
b45ef222
...
...
@@ -218,11 +218,11 @@ BabeList
playlistDialog
.
open
()
}
onOpenWithClicked
:
bae
.
showFolder
([
list
.
get
(
listView
.
currentIndex
).
url
])
onOpenWithClicked
:
Maui
.
FM
.
openLocation
([
list
.
get
(
listView
.
currentIndex
).
url
])
onRemoveClicked
:
{
list
.
remove
(
listView
.
currentIndex
)
//
list.remove(listView.currentIndex)
}
onRateClicked
:
...
...
vvave.cpp
View file @
b45ef222
...
...
@@ -142,5 +142,15 @@ QString vvave::moodColor(const int &index)
else
return
""
;
}
void
vvave
::
scanDir
(
const
QString
&
path
)
{
this
->
checkCollection
(
QStringList
()
<<
path
);
}
QStringList
vvave
::
getSourceFolders
()
{
return
this
->
db
->
getSourcesFolders
();
}
vvave.h
View file @
b45ef222
...
...
@@ -33,6 +33,12 @@ public slots:
/// useful functions for non modeled views and actions with not direct access to a tracksmodel or its own model
QVariantList
sourceFolders
()
const
;
static
QString
moodColor
(
const
int
&
index
);
void
scanDir
(
const
QString
&
path
);
QStringList
getSourceFolders
();
};
#endif // VVAVE_H
widgets/PlaylistsView/PlaylistsView.qml
View file @
b45ef222
...
...
@@ -16,13 +16,9 @@ Kirigami.PageRow
id
:
playlistViewRoot
property
string
playlistQuery
// property alias playlistModel : playlistViewModel.model
// property alias playlistList : playlistViewModel.list
// property alias playlistViewList : playlistViewModel
// property alias list : _playlistsList
// property alias listModel: _playlistsModel
// property alias listView : playlistViewModel.listView
property
alias
playlistModel
:
playlistViewModel
.
model
property
alias
playlistList
:
playlistViewModel
.
list
property
alias
playlistViewList
:
playlistViewModel
signal
rowClicked
(
var
track
)
signal
quickPlayTrack
(
var
track
)
...
...
@@ -187,53 +183,52 @@ Kirigami.PageRow
onRemoveClicked
:
{
bae
.
removePlaylistTrack
(
url
,
playlistViewModel
.
model
.
get
(
playlistViewList
.
currentIndex
).
playlist
)
playlistList
.
removeTrack
(
playlistViewList
.
currentIndex
,
filterList
.
list
.
get
(
filterList
.
currentIndex
).
url
)
populate
(
playlistQuery
)
}
}
}
function
populateExtra
(
query
,
title
)
{
// playlistSwipe.currentIndex = 1
// var res = bae.get(query)
// playlistViewModelFilter.clearTable()
// playlistViewModelFilter.headBarTitle = title
// appendToExtraList(res)
}
function
populateExtra
(
query
,
title
)
{
// playlistSwipe.currentIndex = 1
function
appendToExtraList
(
res
)
{
if
(
res
.
length
>
0
)
for
(
var
i
in
res
)
playlistViewModelFilter
.
model
.
append
(
res
[
i
])
}
// var res = bae.get(query)
// playlistViewModelFilter.clearTable()
// playlistViewModelFilter.headBarTitle = title
// appendToExtraList(res)
}
function
populate
(
query
)
{
if
(
!
playlistViewRoot
.
wideMode
)
playlistViewRoot
.
currentIndex
=
1
function
appendToExtraList
(
res
)
{
if
(
res
.
length
>
0
)
for
(
var
i
in
res
)
playlistViewModelFilter
.
model
.
append
(
res
[
i
])
}
playlistViewRoot
.
playlistQuery
=
query
filterList
.
list
.
query
=
playlistViewRoot
.
playlistQuery
}
function
populate
(
query
)
{
if
(
!
playlistViewRoot
.
wideMode
)
playlistViewRoot
.
currentIndex
=
1
function
refresh
()
{
}
playlistViewRoot
.
playlistQuery
=
query
filterList
.
list
.
query
=
playlistViewRoot
.
playlistQuery
}
function
syncAndPlay
(
index
)
{
if
(
!
playlistList
.
get
(
index
).
playlistIcon
)
playlistViewRoot
.
playSync
(
playlistList
.
get
(
index
).
playlist
)
}
function
refresh
()
{
}
function
removePlaylist
()
{
bae
.
removePlaylist
(
playlistList
.
get
(
playlistViewList
.
currentIndex
).
playlist
)
function
syncAndPlay
(
index
)
{
if
(
!
playlistList
.
get
(
index
).
playlistIcon
)
playlistViewRoot
.
playSync
(
playlistList
.
get
(
index
).
playlist
)
}
filterList
.
clearTable
()
}
function
removePlaylist
()
{
playlistList
.
removePlaylist
(
playlistViewList
.
currentIndex
)
filterList
.
clearTable
()
}
}
widgets/SettingsView/SourcesDialog.qml
View file @
b45ef222
...
...
@@ -14,7 +14,7 @@ Maui.Dialog
defaultButtons
:
false
function
scanDir
(
folderUrl
)
{
ba
e
.
scanDir
(
folderUrl
)
vvav
e
.
scanDir
(
folderUrl
)
}
Maui.Dialog
...
...
@@ -113,7 +113,7 @@ Maui.Dialog
function
getSources
()
{
sources
.
model
.
clear
()
var
folders
=
ba
e
.
getSourceFolders
()
var
folders
=
vvav
e
.
getSourceFolders
()
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