mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Repair broken userdata.
The UserData of an item was not displaying, this should re-add it.
This commit is contained in:
parent
7b6c272aa9
commit
bb1e3ea21d
13 changed files with 79 additions and 41 deletions
|
@ -34,6 +34,7 @@ Page {
|
|||
id: pageRoot
|
||||
property string itemId: ""
|
||||
property alias itemData: jItemLoader.data
|
||||
property alias itemLoader: jItemLoader
|
||||
property bool _loading: jItemLoader.status === J.ItemLoader.Loading
|
||||
readonly property bool hasLogo: (typeof itemData.imageTags !== "undefined") && (typeof itemData.imageTags["Logo"] !== "undefined")
|
||||
property string _chosenBackdropImage: ""
|
||||
|
|
|
@ -79,7 +79,7 @@ BaseDetailPage {
|
|||
shimColor: Theme.overlayBackgroundColor
|
||||
shimOpacity: Theme.opacityOverlay
|
||||
//width: model.userData.PlayedPercentage * parent.width / 100
|
||||
visible: episodeProgress.width > 0 || model.userData.played || model.userData.isFavorite // It doesn't look nice when it's visible on every image
|
||||
visible: episodeProgress.width > 0 || model.userDataPlayed || model.userDataFavorite // It doesn't look nice when it's visible on every image
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -89,7 +89,7 @@ BaseDetailPage {
|
|||
bottom: parent.bottom
|
||||
}
|
||||
height: Theme.paddingMedium
|
||||
width: model.userData.playedPercentage * parent.width / 100
|
||||
width: model.userDataPlayedPercentage * parent.width / 100
|
||||
color: Theme.highlightColor
|
||||
}
|
||||
Row {
|
||||
|
@ -103,12 +103,12 @@ BaseDetailPage {
|
|||
|
||||
Icon {
|
||||
source: "image://theme/icon-s-checkmark"
|
||||
visible: model.userData.played
|
||||
visible: model.userDataPlayed
|
||||
}
|
||||
|
||||
Icon {
|
||||
source: "image://theme/icon-s-favorite"
|
||||
visible: model.userData.isFavorite
|
||||
visible: model.userDataFavorite
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ BaseDetailPage {
|
|||
property alias subtitle: pageHeader.description
|
||||
default property alias _data: content.data
|
||||
property real _playbackProsition: itemData.userData.playbackPositionTicks
|
||||
readonly property bool _userdataReady: itemData.status === J.ItemLoader.Ready && itemData.userData !== null
|
||||
readonly property bool _userdataReady: itemLoader.status === J.ItemLoader.Ready && itemData.userData !== null
|
||||
SilicaFlickable {
|
||||
anchors.fill: parent
|
||||
contentHeight: content.height + Theme.paddingLarge
|
||||
|
@ -60,7 +60,7 @@ BaseDetailPage {
|
|||
imageBlurhash: itemData.imageBlurHashes["Primary"][itemData.imageTags["Primary"]]
|
||||
Binding on favourited {
|
||||
when: _userdataReady
|
||||
value: itemData.userData.isFavorite
|
||||
value: itemData.userData.favorite
|
||||
}
|
||||
Binding on playProgress {
|
||||
when: _userdataReady
|
||||
|
@ -82,7 +82,7 @@ BaseDetailPage {
|
|||
}
|
||||
|
||||
Connections {
|
||||
target: itemData
|
||||
target: itemLoader
|
||||
onStatusChanged: {
|
||||
if (status === J.ItemLoader.Ready) {
|
||||
console.log(itemData.mediaStreams)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue