mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-06 10:32:44 +00:00
Implement playlist model and UI
This commit is contained in:
parent
e04ec364c1
commit
f09593c245
13 changed files with 309 additions and 36 deletions
|
@ -1,16 +1,34 @@
|
|||
import QtQuick 2.6
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
import nl.netsoj.chris.Jellyfin 1.0
|
||||
import nl.netsoj.chris.Jellyfin 1.0 as J
|
||||
|
||||
import "music"
|
||||
|
||||
SilicaListView {
|
||||
header: SectionHeader { text: qsTr("Play queue") }
|
||||
//header: PageHeader { title: qsTr("Play queue") }
|
||||
section.property: "section"
|
||||
section.delegate: SectionHeader {
|
||||
text: {
|
||||
switch(section) {
|
||||
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:
|
||||
return qsTr("Unknown section")
|
||||
}
|
||||
}
|
||||
}
|
||||
delegate: SongDelegate {
|
||||
artists: model.artists
|
||||
name: model.name
|
||||
width: parent.width
|
||||
indexNumber: ListView.index
|
||||
indexNumber: index + 1
|
||||
duration: model.runTimeTicks
|
||||
playing: model.playing
|
||||
}
|
||||
clip: true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue