1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-05-09 15:42:42 +00:00

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 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 This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
@ -27,6 +27,8 @@ import "../.."
VideoPage { VideoPage {
subtitle: qsTr("Released: %1 — Run time: %2").arg(itemData.productionYear).arg(Utils.ticksToText(itemData.runTimeTicks)) 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 { SectionHeader {
text: qsTr("Overview") text: qsTr("Overview")

View file

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