1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-05 10:12:46 +00:00

Added debug page, fix RemoteImage on covers

This commit is contained in:
Chris Josten 2021-02-13 21:42:57 +01:00
parent eda4994aac
commit 5ddd5e8e2e
12 changed files with 112 additions and 123 deletions

View file

@ -26,10 +26,10 @@ import "../components"
import ".."
CoverBackground {
property var mData: appWindow.itemData
property JellyfinItem mData: appWindow.itemData
RemoteImage {
anchors.fill: parent
source: Utils.itemImageUrl(ApiClient.baseUrl, itemData, "Primary", {"maxWidth": parent.width})
source: mData == null ? "" : Utils.itemImageUrl(ApiClient.baseUrl, mData, "Primary", {"maxWidth": parent.width})
fillMode: Image.PreserveAspectCrop
onSourceChanged: console.log(source)
}
@ -37,7 +37,7 @@ CoverBackground {
Shim {
// Movies usually show their name on the poster,
// so showing it here as well is a bit double
visible: itemData.type !== "Movie"
visible: mData.type !== "Movie"
anchors {
left: parent.left
right: parent.right
@ -71,13 +71,13 @@ CoverBackground {
right: parent.right
}
color: Theme.primaryColor
text: itemData.name
text: mData.name
truncationMode: TruncationMode.Fade
}
Label {
visible: typeof itemData.runTimeTicks !== "undefined"
visible: typeof mData.runTimeTicks !== "undefined"
color: Theme.secondaryColor
text: Utils.ticksToText(itemData.runTimeTicks)
text: Utils.ticksToText(mData.runTimeTicks)
}
}
}