2021-03-19 19:57:04 +00:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
import QtQuick.Window 2.12
|
|
|
|
|
2021-03-25 16:32:00 +00:00
|
|
|
import nl.netsoj.chris.Jellyfin 1.0 as J
|
2021-03-19 19:57:04 +00:00
|
|
|
|
|
|
|
import "../components"
|
|
|
|
import "../.."
|
2021-03-29 21:48:16 +00:00
|
|
|
import ".."
|
2021-03-19 19:57:04 +00:00
|
|
|
|
|
|
|
Page {
|
2021-03-29 21:48:16 +00:00
|
|
|
id: detailPage
|
2021-03-19 19:57:04 +00:00
|
|
|
property bool _modelsLoaded: false
|
|
|
|
property StackView stackView: StackView.view
|
|
|
|
property string itemId
|
2021-03-29 21:48:16 +00:00
|
|
|
property alias jellyfinItem: jellyfinItemLoader.data
|
2021-03-19 19:57:04 +00:00
|
|
|
header: ToolBar {
|
|
|
|
Label {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
font.pixelSize: SailfinStyle.fontSizeLarge
|
|
|
|
text: jellyfinItem.name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: stackView.pop()
|
|
|
|
}
|
2021-03-25 16:32:00 +00:00
|
|
|
J.ItemLoader {
|
2021-03-29 21:48:16 +00:00
|
|
|
id: jellyfinItemLoader
|
|
|
|
itemId: detailPage.itemId
|
2021-03-19 19:57:04 +00:00
|
|
|
apiClient: ApiClient
|
|
|
|
}
|
|
|
|
|
|
|
|
Image {
|
2021-03-29 21:48:16 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
width: parent.width
|
|
|
|
height: parent.height / 3
|
2021-03-19 19:57:04 +00:00
|
|
|
source: ApiClient.baseUrl + "/Items/" + itemId + "/Images/Primary?tag=" + jellyfinItem.tag
|
|
|
|
}
|
2021-07-31 13:06:17 +00:00
|
|
|
J.ItemModel {
|
|
|
|
id: tracks
|
|
|
|
loader: J.UserItemsLoader {
|
|
|
|
apiClient: ApiClient
|
|
|
|
parentId: detailPage.itemId
|
|
|
|
}
|
|
|
|
}
|
2021-03-29 21:48:16 +00:00
|
|
|
|
|
|
|
ListView {
|
|
|
|
width: parent.width
|
|
|
|
height: parent.height / 3 * 2
|
|
|
|
anchors.bottom: parent.bottom
|
2021-07-31 13:06:17 +00:00
|
|
|
model: tracks
|
|
|
|
delegate: ItemDelegate {
|
2021-03-29 21:48:16 +00:00
|
|
|
icon.source: ApiClient.baseUrl + "/Items/" + model.jellyfinId + "/Images/Primary?tag=" + model.tag
|
|
|
|
text: model.name
|
2021-07-31 13:06:17 +00:00
|
|
|
width: ListView.view.width
|
|
|
|
onClicked: playbackManager.playItemInList(tracks, model.index)
|
2021-03-29 21:48:16 +00:00
|
|
|
}
|
|
|
|
}
|
2021-03-19 19:57:04 +00:00
|
|
|
}
|