mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-01 08:52:45 +00:00
Added more fields to Jellyfin::Item, update qml
* [UI] Improved: series season page now shows favourite and watched marks Refractored some more QML to support camelCase items
This commit is contained in:
parent
d81fa50715
commit
8a683df2a2
13 changed files with 131 additions and 70 deletions
|
@ -79,7 +79,7 @@ CoverBackground {
|
|||
clip: true
|
||||
height: row1.height
|
||||
width: height
|
||||
source: model.id ? Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags["Primary"], "Primary", {"maxHeight": row1.height})
|
||||
source: model.id ? Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags.primary, "Primary", {"maxHeight": row1.height})
|
||||
: ""
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ CoverBackground {
|
|||
clip: true
|
||||
height: row2.height
|
||||
width: height
|
||||
source: Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags["Primary"], "Primary", {"maxHeight": row1.height})
|
||||
source: Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags.primary, "Primary", {"maxHeight": row1.height})
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,16 +29,15 @@ CoverBackground {
|
|||
property var mData: appWindow.itemData
|
||||
RemoteImage {
|
||||
anchors.fill: parent
|
||||
source: mData.ImageTags["Primary"] ? ApiClient.baseUrl + "/Items/" + mData.Id
|
||||
+ "/Images/Primary?maxHeight=" + height + "&tag=" + mData.ImageTags["Primary"]
|
||||
: ""
|
||||
source: Utils.itemImageUrl(ApiClient.baseUrl, itemData, "Primary", {"maxWidth": parent.width})
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
onSourceChanged: console.log(source)
|
||||
}
|
||||
|
||||
Shim {
|
||||
// Movies usually show their name on the poster,
|
||||
// so showing it here as well is a bit double
|
||||
visible: itemData.Type !== "Movie"
|
||||
visible: itemData.type !== "Movie"
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
|
@ -52,7 +51,7 @@ CoverBackground {
|
|||
top: parent.top
|
||||
left: parent.left
|
||||
}
|
||||
width: itemData.UserData.PlayedPercentage / 100 * parent.width
|
||||
width: itemData.userData.playedPercentage / 100 * parent.width
|
||||
height: Theme.paddingSmall
|
||||
color: Theme.highlightColor
|
||||
}
|
||||
|
@ -72,13 +71,13 @@ CoverBackground {
|
|||
right: parent.right
|
||||
}
|
||||
color: Theme.primaryColor
|
||||
text: itemData.Name
|
||||
text: itemData.name
|
||||
truncationMode: TruncationMode.Fade
|
||||
}
|
||||
Label {
|
||||
visible: typeof itemData.RunTimeTicks !== "undefined"
|
||||
visible: typeof itemData.runTimeTicks !== "undefined"
|
||||
color: Theme.secondaryColor
|
||||
text: Utils.ticksToText(itemData.RunTimeTicks)
|
||||
text: Utils.ticksToText(itemData.runTimeTicks)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,30 +25,22 @@ import nl.netsoj.chris.Jellyfin 1.0
|
|||
|
||||
import "../components"
|
||||
|
||||
CoverBackground {
|
||||
PosterCover {
|
||||
readonly property MediaPlayer player: appWindow.mediaPlayer
|
||||
property var mData: appWindow.itemData
|
||||
|
||||
Rectangle {
|
||||
// Wanted to display the currently running move on here, but it's hard :/
|
||||
/*Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
|
||||
// Wanted to display the currently running move on here, but it's hard :/
|
||||
/*VideoOutput {
|
||||
VideoOutput {
|
||||
id: coverOutput
|
||||
anchors.fill: parent
|
||||
source: player
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
// As a temporary fallback, use the poster image
|
||||
RemoteImage {
|
||||
anchors.fill: parent
|
||||
source: mData.ImageTags["Primary"] ? ApiClient.baseUrl + "/Items/" + mData.Id
|
||||
+ "/Images/Primary?maxHeight=" + height + "&tag=" + mData.ImageTags["Primary"]
|
||||
: ""
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
}*/
|
||||
|
||||
Shim {
|
||||
anchors {
|
||||
|
|
|
@ -83,7 +83,7 @@ Page {
|
|||
//appWindow.itemData = ({})
|
||||
}
|
||||
if (status == PageStatus.Active) {
|
||||
|
||||
appWindow.itemData = jItem
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ BaseDetailPage {
|
|||
cellHeight: Utils.usePortraitCover(itemData.CollectionType) ? Constants.libraryDelegatePosterHeight
|
||||
: Constants.libraryDelegateHeight
|
||||
header: PageHeader {
|
||||
title: itemData.Name || qsTr("Loading")
|
||||
title: itemData.name || qsTr("Loading")
|
||||
}
|
||||
PullDownMenu {
|
||||
id: downMenu
|
||||
|
@ -58,7 +58,7 @@ BaseDetailPage {
|
|||
RemoteImage {
|
||||
id: itemImage
|
||||
anchors.fill: parent
|
||||
source: Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags["Primary"], "Primary", {"maxWidth": width})
|
||||
source: Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags.primary, "Primary", {"maxWidth": width})
|
||||
fallbackColor: Utils.colorFromString(model.name)
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
clip: true
|
||||
|
|
|
@ -68,7 +68,7 @@ BaseDetailPage {
|
|||
shimColor: Theme.overlayBackgroundColor
|
||||
shimOpacity: Theme.opacityOverlay
|
||||
//width: model.userData.PlayedPercentage * parent.width / 100
|
||||
visible: episodeProgress.width > 0 // It doesn't look nice when it's visible on every image
|
||||
visible: episodeProgress.width > 0 || model.userData.played || model.userData.isFavorite // It doesn't look nice when it's visible on every image
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -78,9 +78,28 @@ BaseDetailPage {
|
|||
bottom: parent.bottom
|
||||
}
|
||||
height: Theme.paddingMedium
|
||||
width: model.userData.playedPercentage * parent.width / 100
|
||||
width: model.userData.playedPercentage * parent.width / 100
|
||||
color: Theme.highlightColor
|
||||
}
|
||||
Row {
|
||||
spacing: Theme.paddingSmall
|
||||
anchors {
|
||||
bottom: episodeProgress.width > 0 ? episodeProgress.top : parent.bottom
|
||||
bottomMargin: Theme.paddingMedium
|
||||
right: parent.right
|
||||
rightMargin: Theme.paddingMedium
|
||||
}
|
||||
|
||||
Icon {
|
||||
source: "image://theme/icon-s-checkmark"
|
||||
visible: model.userData.played
|
||||
}
|
||||
|
||||
Icon {
|
||||
source: "image://theme/icon-s-favorite"
|
||||
visible: model.userData.isFavorite
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
|
@ -129,9 +148,9 @@ BaseDetailPage {
|
|||
}
|
||||
onStatusChanged: {
|
||||
if (status == PageStatus.Active) {
|
||||
console.log(JSON.stringify(itemData))
|
||||
episodeModel.show = itemData.seriesId
|
||||
episodeModel.seasonId = itemData.jellyfinId
|
||||
//console.log(JSON.stringify(itemData))
|
||||
episodeModel.show = itemData.seriesId
|
||||
episodeModel.seasonId = itemData.jellyfinId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue