-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
887 lines (749 loc) · 27.2 KB
/
main.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Material 2.1
import "services/local"
import "utils"
import "widgets"
import "widgets/MyBeatView"
import "widgets/PlaylistsView"
import "widgets/MainPlaylist"
import "widgets/SettingsView"
import "widgets/SearchView"
import "view_models"
import "view_models/BabeDialog"
import "services/web"
import "db/Queries.js" as Q
import "utils/Player.js" as Player
import "utils/Help.js" as H
import org.kde.kirigami 2.2 as Kirigami
import Link.Codes 1.0
Kirigami.ApplicationWindow
{
id: root
visible: true
width: !isMobile ? wideSize : 400
minimumWidth: !isMobile ? columnWidth : 0
minimumHeight: !isMobile ? columnWidth+64 : 0
height: 500
title: qsTr("Babe")
// wideScreen: root.width > coverSize
/*ALIASES*/
property alias playIcon: playIcon
property alias babeBtnIcon: babeBtnIcon
property alias progressBar : progressBar
property alias animFooter : animFooter
property alias mainPlaylist : mainPlaylist
/*PLAYBACK*/
property bool isShuffle : false
property var currentTrack : ({babe: "0", stars: "0"})
property int currentTrackIndex : 0
property int prevTrackIndex : 0
property string currentArtwork : !mainlistEmpty ? mainPlaylist.list.model.get(0).artwork : ""
property bool currentBabe : currentTrack.babe == "0" ? false : true
property string durationTimeLabel : "00:00"
property string progressTimeLabel : "00:00"
property bool isPlaying : false
property bool autoplay : bae.loadSetting("AUTOPLAY", "BABE", false) === "true" ? true : false
property int onQueue : 0
/*THEMING*/
property string babeColor : bae.babeColor()
property string babeAltColor : bae.babeAltColor()
property string backgroundColor : isMobile ? bae.backgroundColor() : Kirigami.Theme.backgroundColor
property string viewBackgroundColor : isMobile ? bae.altColor() : Kirigami.Theme.viewBackgroundColor
property string foregroundColor : isMobile ? bae.foregroundColor() : Kirigami.Theme.textColor
property string textColor : isMobile ? bae.textColor() : Kirigami.Theme.textColor
property string babeHighlightColor : isMobile ? bae.highlightColor() : Kirigami.Theme.highlightColor
property string highlightTextColor : isMobile ? bae.highlightTextColor() : Kirigami.Theme.highlightedTextColor
property string midColor : bae.midColor()
property string midLightColor : isMobile? bae.midLightColor() : Kirigami.Theme.buttonBackgroundColor
property string darkColor : bae.darkColor()
property string baseColor : bae.baseColor()
property string altColor : isMobile ? bae.altColor() : Kirigami.Theme.viewBackgroundColor
property string shadowColor : bae.shadowColor()
readonly property string darkBackgroundColor : "#303030"
readonly property string darkForegroundColor : "#FAFAFA"
readonly property string darkTextColor : darkForegroundColor
readonly property string darkBabeHighlightColor : "#29B6F6"
readonly property string darkHighlightTextColor : darkForegroundColor
readonly property string darkMidColor : "#1d1d1d"
readonly property string darkMidLightColor : "#282828"
readonly property string darkDarkColor : "#191919"
readonly property string darkBaseColor : "#212121"
readonly property string darkAltColor : darkDarkColor
readonly property string darkShadowColor : darkAltColor
Material.theme: Material.Light
Material.accent: babeColor
Material.background: viewBackgroundColor
Material.primary: backgroundColor
Material.foreground: foregroundColor
/*READONLY PROPS*/
readonly property var iconSizes : ({ "small" : 16, "medium" : isMobile ? 24 : 22, "big" : 32, "large" : 48 })
readonly property var fontSizes : ({"tiny": isMobile ? 7.5 : 7, "small" : isMobile ? 9.5 : 8.5, "medium" : isMobile ? 11 : 10, "big" : isMobile ? 11.5 : 10.5, "large" : isMobile ? 12 : 11.5})
readonly property real opacityLevel : 0.8
readonly property bool isMobile: bae.isMobile()
readonly property int wideSize : bae.screenGeometry("width")*0.5
readonly property int rowHeight: isMobile ? 60 : 52
readonly property int rowHeightAlt: isMobile ? 48 : 32
readonly property int headerHeight: rowHeight
readonly property int contentMargins : isMobile ? 8 : 10
readonly property var viewsIndex : ({
"tracks" : 0,
"albums" : 1,
"artists" : 2,
"playlists" : 3,
"babeit": 4,
"search" : 5,
"youtube" : 6,
"linking" :7
})
property bool mainlistEmpty : !mainPlaylist.table.count > 0
/*PROPS*/
property int toolBarIconSize: bae.loadSetting("ICON_SIZE", "BABE", iconSizes.medium)
property int toolBarHeight : isMobile ? 48 : toolBarIconSize *2
property int miniArtSize : isMobile ? 36 : 30
property int columnWidth: Kirigami.Units.gridUnit * 19
property int coverSize: isMobile ? Math.sqrt(root.width*root.height)*0.4 : columnWidth * 0.6
property int currentView : viewsIndex.tracks
/*USEFUL PROPS*/
property string syncPlaylist : ""
property bool sync : false
property string infoMsg : ""
property bool infoLabels : bae.loadSetting("PLAYBACKINFO", "BABE", false) == "true" ? true : false
property bool isLinked : false
property bool isServing : false
/*SIGNALS*/
signal missingAlert(var track)
/*CONF*/
pageStack.defaultColumnWidth: columnWidth
pageStack.initialPage: [mainPlaylist, views]
pageStack.interactive: isMobile
pageStack.separatorVisible: pageStack.wideMode
overlay.modal: Rectangle
{
color: isMobile ? darkColor : "transparent"
opacity: 0.5
height: root.height - playbackControls.height - toolbar.height
y: toolbar.height
}
overlay.modeless: Rectangle
{
color: "transparent"
}
/*HANDLE EVENTS*/
onWidthChanged: if(isMobile)
{
if(width > height)
mainPlaylist.cover.visible = false
else mainPlaylist.cover.visible = true
}
onClosing: Player.savePlaylist()
// pageStack.onCurrentIndexChanged:
// {
// if(pageStack.currentIndex === 0 && isMobile && !pageStack.wideMode)
// {
// bae.androidStatusBarColor(babeColor)
// Material.background = babeColor
// }else
// {
// bae.androidStatusBarColor(babeAltColor)
// Material.background = babeAltColor
// }
// }
onMissingAlert:
{
missingDialog.message = track.title +" by "+track.artist+" is missing"
missingDialog.messageBody = "Do you want to remove it from your collection?"
missingDialog.open()
}
/*COMPONENTS*/
BabeNotify { id: babeNotify }
BabeMessage
{
id: missingDialog
width: isMobile ? parent.width *0.9 : parent.width*0.4
title: "Missing file"
onAccepted:
{
bae.removeTrack(currentTrack.url)
mainPlaylist.table.model.remove(mainPlaylist.table.currentIndex)
}
}
/* UI */
header: BabeBar
{
id: toolbar
// height: toolBarHeight
visible: true
currentIndex: currentView
onSettingsViewClicked: settingsDrawer.visible ? settingsDrawer.close() : settingsDrawer.open()
onTracksViewClicked:
{
pageStack.currentIndex = 1
currentView = viewsIndex.tracks
}
onAlbumsViewClicked:
{
pageStack.currentIndex = 1
currentView = viewsIndex.albums
}
onArtistsViewClicked:
{
pageStack.currentIndex = 1
currentView = viewsIndex.artists
}
onPlaylistsViewClicked:
{
pageStack.currentIndex = 1
currentView = viewsIndex.playlists
}
onBabeViewClicked:
{
pageStack.currentIndex = 1
currentView = viewsIndex.babeit
}
onSearchViewClicked:
{
pageStack.currentIndex = 1
currentView = viewsIndex.search
searchView.searchInput.forceActiveFocus()
}
}
footer: Item
{
id: playbackControls
height: visible ? headerHeight : 0
width: root.width
visible: true
focus: true
FastBlur
{
anchors.fill: parent
source: mainPlaylist.artwork
radius: 100
transparentBorder: false
cached: true
z: -999
}
Rectangle
{
id: footerBg
anchors.fill: parent
color: darkDarkColor
opacity: opacityLevel
z: -999
SequentialAnimation
{
id: animFooter
PropertyAnimation
{
target: footerBg
property: "color"
easing.type: Easing.InOutQuad
from: darkBaseColor
to: darkDarkColor
duration: 500
}
}
}
Slider
{
id: progressBar
height: 10
width: parent.width
z: 999
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
padding: 0
from: 0
to: 1000
value: 0
spacing: 0
focus: true
onMoved: player.seek(player.duration() / 1000 * value);
background: Rectangle
{
x: progressBar.leftPadding
y: progressBar.y
implicitWidth: 200
implicitHeight: 10
width: progressBar.availableWidth
height: implicitHeight
color: "transparent"
Rectangle
{
width: progressBar.visualPosition * parent.width
height: 4
color: babeColor
}
}
handle: Rectangle
{
x: progressBar.leftPadding + progressBar.visualPosition * (progressBar.availableWidth - width)
y: progressBar.y-(height/2)
implicitWidth: progressBar.pressed ? 16 : 0
implicitHeight: progressBar.pressed ? 16 : 0
radius: progressBar.pressed ? 16 : 0
color: babeColor
}
}
GridLayout
{
anchors.fill: parent
height: parent.height
width: parent.width
rowSpacing: 0
columnSpacing: 0
rows: 2
columns: 2
Item
{
Layout.alignment: Qt.AlignLeft
Layout.fillHeight: true
Layout.maximumWidth: miniArtwork.visible ? headerHeight : 0
Layout.minimumWidth: miniArtwork.visible ? headerHeight : 0
Layout.minimumHeight: miniArtwork.visible ? headerHeight : 0
Layout.maximumHeight: miniArtwork.visible ? headerHeight : 0
Layout.row: 1
Layout.rowSpan: 2
Layout.column: 1
Rectangle
{
visible: miniArtwork.visible
anchors.centerIn: parent
height: miniArtSize+4
width: miniArtSize+4
color: darkForegroundColor
z: -999
radius: Math.min(width, height)
}
RotationAnimator on rotation
{
from: 0;
to: 360;
duration: 5000
loops: Animation.Infinite
running: miniArtwork.visible && isPlaying
}
Image
{
id: miniArtwork
visible: ((!pageStack.wideMode && pageStack.currentIndex !== 0) || !mainPlaylist.cover.visible) && !mainlistEmpty
focus: true
height: miniArtSize
width: miniArtSize
// anchors.left: parent.left
anchors.centerIn: parent
source:
{
if(currentArtwork)
(currentArtwork.length > 0 && currentArtwork !== "NONE")? "file://"+encodeURIComponent(currentArtwork) : "qrc:/assets/cover.png"
else "qrc:/assets/cover.png"
}
fillMode: Image.PreserveAspectFit
cache: false
antialiasing: true
MouseArea
{
anchors.fill: parent
onClicked:
{
if(!isMobile && pageStack.wideMode)
root.width = columnWidth
pageStack.currentIndex = 0
}
}
layer.enabled: true
layer.effect: OpacityMask
{
maskSource: Item
{
width: miniArtwork.width
height: miniArtwork.height
Rectangle
{
anchors.centerIn: parent
width: miniArtwork.adapt ? miniArtwork.width : Math.min(miniArtwork.width, miniArtwork.height)
height: miniArtwork.adapt ? miniArtwork.height : width
radius: Math.min(width, height)
}
}
}
}
}
Item
{
Layout.alignment: Qt.AlignCenter
Layout.fillWidth: true
Layout.fillHeight: true
Layout.row: 2
Layout.column: 2
Layout.maximumHeight: playbackInfo.visible ? playbackInfo.font.pointSize*2 : 0
Label
{
id: playbackInfo
visible: !mainlistEmpty && infoLabels
// anchors.top: playIcon.bottom
// anchors.horizontalCenter: playIcon.horizontalCenter
width: parent.width
height: parent.height
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
text: progressTimeLabel + " / " + (currentTrack ? (currentTrack.title ? currentTrack.title + " - " + currentTrack.artist : "--- - "+currentTrack.artist) : "") + " / " + durationTimeLabel
color: darkForegroundColor
font.pointSize: fontSizes.tiny
elide: Text.ElideRight
}
}
RowLayout
{
Layout.fillWidth: true
Layout.fillHeight: true
Layout.alignment: Qt.AlignCenter
Layout.row: 1
Layout.column: 2
BabeButton
{
id: babeBtnIcon
iconName: "love"
iconColor: currentBabe ? babeColor : darkForegroundColor
onClicked: if(!mainlistEmpty)
{
var value = mainPlaylist.contextMenu.babeIt(currentTrackIndex)
currentBabe = value
}
}
BabeButton
{
id: previousBtn
iconColor: darkForegroundColor
iconName: "media-skip-backward"
onClicked: Player.previousTrack()
onPressAndHold: Player.playAt(prevTrackIndex)
}
BabeButton
{
id: playIcon
iconColor: darkForegroundColor
iconName: isPlaying ? "media-playback-pause" : "media-playback-start"
onClicked:
{
if(isPlaying) Player.pauseTrack()
else Player.resumeTrack()
}
}
BabeButton
{
id: nextBtn
iconColor: darkForegroundColor
iconName: "media-skip-forward"
onClicked: Player.nextTrack()
onPressAndHold: Player.playAt(Player.shuffle())
}
BabeButton
{
id: shuffleBtn
iconColor: darkForegroundColor
iconName: isShuffle ? "media-playlist-shuffle" : "media-playlist-repeat"
onClicked: isShuffle = !isShuffle
}
}
}
}
background: Rectangle
{
anchors.fill: parent
color: altColor
z: -999
}
globalDrawer: SettingsView
{
id: settingsDrawer
// contentItem.implicitWidth: columnWidth
onIconSizeChanged: toolBarIconSize = size
}
Item
{
id: message
visible: infoMsg.length > 0 && sync
anchors.bottom: parent.bottom
width: pageStack.wideMode ? columnWidth : parent.width
height: toolBarIconSize
z:999
Rectangle
{
id: infoBg
anchors.fill: parent
z: -999
color: altColor
opacity: opacityLevel
SequentialAnimation
{
id: animBg
PropertyAnimation
{
target: infoBg
property: "color"
easing.type: Easing.InOutQuad
to: babeColor
duration: 250
}
PropertyAnimation
{
target: infoBg
property: "color"
easing.type: Easing.InOutQuad
to: altColor
duration: 500
}
}
}
Label
{
id: infoTxt
anchors.centerIn: parent
anchors.fill: parent
height: parent.height
width: parent.width
font.pointSize: fontSizes.medium
text: infoMsg
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
color: foregroundColor
SequentialAnimation
{
id: animTxt
PropertyAnimation
{
target: infoTxt
property: "color"
easing.type: Easing.InOutQuad
to: "white"
duration: 250
}
PropertyAnimation
{
target: infoTxt
property: "color"
easing.type: Easing.InOutQuad
to: foregroundColor
duration: 500
}
}
}
}
MainPlaylist
{
id: mainPlaylist
anchors.fill: parent
clip: true
Connections
{
target: mainPlaylist
onCoverPressed: Player.appendAll(tracks)
onCoverDoubleClicked: Player.playAll(tracks)
}
}
Page
{
id: views
anchors.fill: parent
clip: true
// focusPolicy: Qt.WheelFocus
// visualFocus: true
Column
{
anchors.fill: parent
SwipeView
{
id: swipeView
width: parent.width
height: parent.height
Component.onCompleted: contentItem.interactive = isMobile
currentIndex: currentView
onCurrentItemChanged: currentItem.forceActiveFocus()
onCurrentIndexChanged:
{
currentView = currentIndex
if(pageStack.currentIndex === 0) mainPlaylist.list.forceActiveFocus()
else if(currentView === viewsIndex.tracks) tracksView.forceActiveFocus()
else if(currentView === viewsIndex.search) searchView.forceActiveFocus()
if(!babeitView.isConnected && currentIndex === viewsIndex.babeit)
babeitView.logginDialog.open()
}
TracksView
{
id: tracksView
Connections
{
target: tracksView
onRowClicked: Player.addTrack(tracksView.model.get(index))
onQuickPlayTrack: Player.quickPlay(tracksView.model.get(index))
onPlayAll: Player.playAll(bae.get(Q.GET.allTracks))
onAppendAll: Player.appendAll(bae.get(Q.GET.allTracks))
onQueueTrack: Player.queueTracks([tracksView.model.get(index)])
}
}
AlbumsView
{
id: albumsView
Connections
{
target: albumsView
onRowClicked: Player.addTrack(track)
onPlayAlbum: Player.playAll(tracks)
onAppendAlbum: Player.appendAll(tracks)
onPlayTrack: Player.quickPlay(track)
}
}
ArtistsView
{
id: artistsView
Connections
{
target: artistsView
onRowClicked: Player.addTrack(track)
onPlayAlbum: Player.playAll(tracks)
onAppendAlbum: Player.appendAll(tracks)
onPlayTrack: Player.quickPlay(track)
}
}
PlaylistsView
{
id: playlistsView
Connections
{
target: playlistsView
onRowClicked: Player.addTrack(track)
onQuickPlayTrack: Player.quickPlay(track)
onPlayAll: Player.playAll(tracks)
onAppendAll: Player.appendAll(tracks)
onPlaySync:
{
var tracks = bae.get(Q.GET.playlistTracks_.arg(playlist))
Player.playAll(tracks)
root.sync = true
root.syncPlaylist = playlist
root.infoMsg = "Syncing to "+ playlist
console.log("ALLOW PLAYLIOST SYNC FOR: " ,root.syncPlaylist = playlist)
}
}
}
BabeitView
{
id: babeitView
}
SearchTable
{
id: searchView
Connections
{
target: searchView.searchTable
onRowClicked: Player.addTrack(searchView.searchTable.model.get(index))
onQuickPlayTrack: Player.quickPlay(searchView.searchTable.model.get(index))
onPlayAll: Player.playAll(searchView.searchRes)
onAppendAll: Player.appendAll(searchView.searchRes)
onArtworkDoubleClicked:
{
var query = Q.GET.albumTracks_.arg(searchView.searchTable.model.get(index).album)
query = query.arg(searchView.searchTable.model.get(index).artist)
Player.playAll(bae.get(query))
}
}
}
YouTube
{
id: youtubeView
}
LinkingView
{
id: linkingView
}
}
}
}
/*animations*/
pageStack.layers.popEnter: Transition {
PauseAnimation {
duration: Kirigami.Units.longDuration
}
}
pageStack.layers.popExit: Transition {
YAnimator {
from: 0
to: pageStack.layers.height
duration: Kirigami.Units.longDuration
easing.type: Easing.OutCubic
}
}
pageStack.layers.pushEnter: Transition {
YAnimator {
from: pageStack.layers.height
to: 0
duration: Kirigami.Units.longDuration
easing.type: Easing.OutCubic
}
}
pageStack.layers.pushExit: Transition {
PauseAnimation {
duration: Kirigami.Units.longDuration
}
}
pageStack.layers.replaceEnter: Transition {
YAnimator {
from: pageStack.layers.width
to: 0
duration: Kirigami.Units.longDuration
easing.type: Easing.OutCubic
}
}
pageStack.layers.replaceExit: Transition {
PauseAnimation {
duration: Kirigami.Units.longDuration
}
}
/*FUNCTIONS*/
function infoMsgAnim()
{
animBg.running = true
animTxt.running = true
}
Component.onCompleted:
{
// if(isMobile) settingsDrawer.switchColorScheme(bae.loadSetting("THEME", "BABE", "Dark"))
// console.log(Imagine.url, Imagine.path)
bae.androidStatusBarColor(viewBackgroundColor)
}
/*CONNECTIONS*/
Connections
{
target: player
onPos: progressBar.value = pos
onTiming: progressTimeLabel = time
onDurationChanged: durationTimeLabel = time
onFinished: if(!mainlistEmpty)
{
if(currentTrack.url)
bae.playedTrack(currentTrack.url)
Player.nextTrack()
}
onIsPlaying: isPlaying = playing
}
Connections
{
target: bae
onRefreshTables: H.refreshCollection(size)
onRefreshTracks: H.refreshTracks()
onRefreshAlbums: H.refreshAlbums()
onRefreshArtists: H.refreshArtists()
onTrackLyricsReady:
{
if(url === currentTrack.url)
Player.setLyrics(lyrics)
}
onSkipTrack: Player.nextTrack()
onBabeIt: Player.babeTrack()
}
}