2021-02-20 22:20:39 +00:00
|
|
|
import QtQuick 2.6
|
|
|
|
import Sailfish.Silica 1.0
|
|
|
|
|
2021-08-21 20:01:13 +00:00
|
|
|
import nl.netsoj.chris.Jellyfin 1.0 as J
|
2021-02-20 22:20:39 +00:00
|
|
|
|
|
|
|
import "music"
|
|
|
|
|
|
|
|
SilicaListView {
|
2021-08-21 20:01:13 +00:00
|
|
|
//header: PageHeader { title: qsTr("Play queue") }
|
2021-08-21 20:33:23 +00:00
|
|
|
property var playbackManager
|
2021-08-21 20:01:13 +00:00
|
|
|
section.property: "section"
|
|
|
|
section.delegate: SectionHeader {
|
|
|
|
text: {
|
2021-08-21 22:29:44 +00:00
|
|
|
switch(Number(section)) {
|
2021-08-21 20:01:13 +00:00
|
|
|
case J.NowPlayingSection.Queue:
|
|
|
|
//: Now playing page queue section header
|
|
|
|
return qsTr("Queue")
|
|
|
|
case J.NowPlayingSection.NowPlaying:
|
|
|
|
//: Now playing page playlist section header
|
|
|
|
return qsTr("Playlist")
|
|
|
|
default:
|
2021-08-21 22:29:44 +00:00
|
|
|
return qsTr("Unknown section: %1").arg(ListView.section)
|
2021-08-21 20:01:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-02-20 22:20:39 +00:00
|
|
|
delegate: SongDelegate {
|
2022-07-29 23:16:40 +00:00
|
|
|
artists: model.artistItems
|
2021-02-20 22:20:39 +00:00
|
|
|
name: model.name
|
|
|
|
width: parent.width
|
2021-08-21 20:01:13 +00:00
|
|
|
indexNumber: index + 1
|
|
|
|
duration: model.runTimeTicks
|
|
|
|
playing: model.playing
|
2021-08-21 20:33:23 +00:00
|
|
|
onClicked: playbackManager.skipToItemIndex(model.index)
|
2021-02-20 22:20:39 +00:00
|
|
|
}
|
2021-08-21 20:01:13 +00:00
|
|
|
clip: true
|
2021-02-20 22:20:39 +00:00
|
|
|
}
|