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

Ready model for infinite lists

This commit is contained in:
Chris Josten 2020-09-27 03:14:05 +02:00
parent 1ba7f6f8ef
commit 5ea17070fe
9 changed files with 151 additions and 37 deletions

View file

@ -47,14 +47,14 @@ Page {
apiClient: ApiClient
}
MoreSection {
MoreSection {
text: qsTr("Resume watching")
clickable: false
}
MoreSection {
}
MoreSection {
text: qsTr("Next up")
clickable: false
}
}
UserViewModel {
id: mediaLibraryModel
@ -95,7 +95,7 @@ Page {
property string id: model.id
title: model.name
poster: Utils.itemModelImageUrl(ApiClient.baseUrl, model.id, model.imageTags["Primary"], "Primary", {"maxHeight": height})
/*model.imageTags["Primary"] ? ApiClient.baseUrl + "/Items/" + model.id
/*model.imageTags["Primary"] ? ApiClient.baseUrl + "/Items/" + model.id
+ "/Images/Primary?maxHeight=" + height + "&tag=" + model.imageTags["Primary"]
: ""*/
landscape: !Utils.usePortraitCover(model.type)
@ -113,6 +113,7 @@ Page {
Connections {
target: mediaLibraryModel
onStatusChanged: {
console.log("MediaLibraryModel status " + status)
if (status == ApiModel.Ready) {
userItemModel.reload()
}
@ -165,5 +166,5 @@ Page {
_modelsLoaded = true;
mediaLibraryModel.reload()
}
}
}
}