mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-04-02 19:02:41 +00:00
Adjusted C++ code to handle with new and renamed objects, as well as properties with different types. As a result of changing types, the QML side had to be updated as well. I hope I found everything by manually testing. Additionally, the Qt Quick application has been updated to test the remote sessions more easily and to make it launch again.
61 lines
1.9 KiB
QML
61 lines
1.9 KiB
QML
import QtQuick 2.6
|
|
import Sailfish.Silica 1.0
|
|
|
|
import nl.netsoj.chris.Jellyfin 1.0 as J
|
|
|
|
import "../"
|
|
|
|
MoreSection {
|
|
id: header
|
|
busy: itemModel.loader.status === J.ModelStatus.Loading || extraBusy
|
|
property bool extraBusy: false
|
|
property alias loader: itemModel.loader
|
|
property int collectionType
|
|
property bool collapseWhenEmpty: true
|
|
|
|
J.ItemModel {
|
|
id: itemModel
|
|
}
|
|
|
|
SilicaListView {
|
|
readonly property bool isPortrait: Utils.usePortraitCover(collectionType)
|
|
id: list
|
|
clip: true
|
|
height: {
|
|
if (count > 0 || !collapseWhenEmpty) {
|
|
if (isPortrait) {
|
|
Constants.libraryDelegatePosterHeight
|
|
} else {
|
|
Constants.libraryDelegateHeight
|
|
}
|
|
} else {
|
|
0
|
|
}
|
|
}
|
|
Behavior on height {
|
|
NumberAnimation { easing.type: Easing.OutQuad; duration: 300 }
|
|
}
|
|
model: itemModel
|
|
width: parent.width
|
|
orientation: ListView.Horizontal
|
|
leftMargin: Theme.horizontalPageMargin
|
|
rightMargin: Theme.horizontalPageMargin
|
|
spacing: Theme.paddingLarge
|
|
delegate: LibraryItemDelegate {
|
|
property string id: model.jellyfinId
|
|
title: model.name
|
|
poster: Utils.itemModelImageUrl(appWindow.apiClient.baseUrl, model.jellyfinId, model.imageTags["Primary"], "Primary", {"height": height})
|
|
Binding on blurhash {
|
|
when: poster != ""
|
|
value: model.imageBlurHashes["Primary"][model.imageTags["Primary"]]
|
|
}
|
|
landscape: !list.isPortrait
|
|
progress: (typeof model.userDataPlayedProgress !== 0.0) ? model.userDataPlayedPercentage / 100 : 0.0
|
|
|
|
onClicked: {
|
|
appWindow.navigateToItem(model.jellyfinId, model.mediaType, model.type, model.isFolder);
|
|
}
|
|
}
|
|
}
|
|
}
|