sailfish: display backdrop instead of poster on film page

This simply looks better, since the backdrop has a more suitable aspect
ratio.
This commit is contained in:
Chris Josten 2024-01-02 22:42:35 +01:00
parent a35d8026be
commit 5e62fe7624
2 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/*
Sailfin: a Jellyfin client written using Qt
Copyright (C) 2020 Chris Josten
Copyright (C) 2020-2024 Chris Josten
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -27,6 +27,8 @@ import "../.."
VideoPage {
subtitle: qsTr("Released: %1 — Run time: %2").arg(itemData.productionYear).arg(Utils.ticksToText(itemData.runTimeTicks))
imageSource: Utils.itemBackdropUrl(apiClient.baseUrl, itemData, 0, {"maxWidth": parent.width})
imageBlurhash: itemData.imageBlurHashes["Backdrop"][itemData.backdropImageTags[0]]
SectionHeader {
text: qsTr("Overview")

View File

@ -1,6 +1,6 @@
/*
Sailfin: a Jellyfin client written using Qt
Copyright (C) 2020 Chris Josten
Copyright (C) 2020-2024 Chris Josten
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -30,10 +30,15 @@ import "../.."
* the FilmPage or EpisodePage.
*/
BaseDetailPage {
id: detailPage
property alias subtitle: pageHeader.description
default property alias _data: content.data
property real _playbackProsition: itemData.userData.playbackPositionTicks
readonly property bool _userdataReady: itemLoader.status === J.ItemLoader.Ready && itemData.userData !== null
property string imageSource: Utils.itemImageUrl(apiClient.baseUrl, itemData, "Primary", {"maxWidth": parent.width})
property string imageBlurhash: itemData.imageBlurHashes["Primary"][itemData.imageTags["Primary"]]
SilicaFlickable {
anchors.fill: parent
contentHeight: content.height + Theme.paddingLarge
@ -55,9 +60,9 @@ BaseDetailPage {
PlayToolbar {
id: toolbar
width: parent.width
imageSource: Utils.itemImageUrl(apiClient.baseUrl, itemData, "Primary", {"maxWidth": parent.width})
imageSource: detailPage.imageSource
imageAspectRatio: Constants.horizontalVideoAspectRatio
imageBlurhash: itemData.imageBlurHashes["Primary"][itemData.imageTags["Primary"]]
imageBlurhash: detailPage.imageBlurhash
Binding on favourited {
when: _userdataReady
value: itemData.userData.favorite