Basic play queue support
This commit is contained in:
parent
af609a0b3f
commit
d12e871257
4 changed files with 75 additions and 3 deletions
|
@ -1 +1 @@
|
|||
Subproject commit e271291f924e97cbd1b53880c55033c359f31b8c
|
||||
Subproject commit 77b24d58cb3352b7285b32c320671e1205e28daf
|
|
@ -75,6 +75,16 @@ ListItem {
|
|||
player.playbackEpisode(id);
|
||||
}
|
||||
}
|
||||
|
||||
onPressAndHold: {
|
||||
player.enqueueEpisode(id, function () {
|
||||
if (!player.isPlaying) {
|
||||
player.jumpToQueueIndex(0);
|
||||
} else {
|
||||
pageStack.navigateForward(PageStackAction.Animated);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
IconMenuItem {
|
||||
|
|
|
@ -77,6 +77,21 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: 'Enqueue episodes in player'
|
||||
onClicked: {
|
||||
var startPlayback = Util.atMostOnce(function () {
|
||||
if (!player.isPlaying) {
|
||||
player.jumpToQueueIndex(0);
|
||||
}
|
||||
});
|
||||
|
||||
episodeListModel.forEachEpisode(function (episode) {
|
||||
player.enqueueEpisode(episode.id, startPlayback);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: 'Unsubscribe'
|
||||
onClicked: {
|
||||
|
|
|
@ -111,7 +111,7 @@ Page {
|
|||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: Theme.itemSizeSmall
|
||||
height: Theme.paddingSmall
|
||||
}
|
||||
|
||||
Label {
|
||||
|
@ -126,7 +126,7 @@ Page {
|
|||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: Theme.paddingMedium
|
||||
height: Theme.paddingSmall
|
||||
}
|
||||
|
||||
Slider {
|
||||
|
@ -143,6 +143,53 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: 'Play queue'
|
||||
visible: playQueueRepeater.count > 0
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: playQueueRepeater
|
||||
model: player.queue
|
||||
property Item contextMenu
|
||||
|
||||
property var queueConnections: Connections {
|
||||
target: player
|
||||
|
||||
onQueueUpdated: {
|
||||
playQueueRepeater.model = player.queue;
|
||||
}
|
||||
}
|
||||
|
||||
ListItem {
|
||||
id: playQueueListItem
|
||||
|
||||
width: parent.width
|
||||
|
||||
menu: ContextMenu {
|
||||
MenuItem {
|
||||
text: 'Remove from queue'
|
||||
onClicked: player.removeQueueIndex(index);
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
margins: Theme.paddingMedium
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
text: modelData.title
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
player.jumpToQueueIndex(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: Theme.itemSizeLarge
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue