mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-12-22 22:15:17 +00:00
Implement nextUp endpoint and UI
* [UI] Added: The next up section now actually loads items
This commit is contained in:
parent
d3a7c17586
commit
d6a1f431b4
|
@ -292,6 +292,12 @@ public:
|
|||
: ItemModel ("/Users/{{user}}/Items/Latest", false, false, parent) {}
|
||||
};
|
||||
|
||||
class ShowNextUpModel : public ItemModel {
|
||||
public:
|
||||
explicit ShowNextUpModel (QObject *parent = nullptr)
|
||||
: ItemModel("/Shows/NextUp", true, true, parent) {}
|
||||
};
|
||||
|
||||
class ShowSeasonsModel : public ItemModel {
|
||||
public:
|
||||
explicit ShowSeasonsModel (QObject *parent = nullptr)
|
||||
|
|
|
@ -249,6 +249,7 @@ void registerModels(const char *URI) {
|
|||
qmlRegisterType<UserItemModel>(URI, 1, 0, "UserItemModel");
|
||||
qmlRegisterType<UserItemLatestModel>(URI, 1, 0, "UserItemLatestModel");
|
||||
qmlRegisterType<UserItemResumeModel>(URI, 1, 0, "UserItemResumeModel");
|
||||
qmlRegisterType<ShowNextUpModel>(URI, 1, 0, "ShowNextUpModel");
|
||||
qmlRegisterType<ShowSeasonsModel>(URI, 1, 0, "ShowSeasonsModel");
|
||||
qmlRegisterType<ShowEpisodesModel>(URI, 1, 0, "ShowEpisodesModel");
|
||||
}
|
||||
|
|
|
@ -87,6 +87,20 @@ Page {
|
|||
MoreSection {
|
||||
text: qsTr("Next up")
|
||||
clickable: false
|
||||
busy: showNextUpModel.status == ApiModel.Loading
|
||||
|
||||
Loader {
|
||||
width: parent.width
|
||||
sourceComponent: carrouselView
|
||||
property alias itemModel: showNextUpModel
|
||||
property string collectionType: "series"
|
||||
|
||||
ShowNextUpModel {
|
||||
id: showNextUpModel
|
||||
apiClient: ApiClient
|
||||
limit: 12
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UserViewModel {
|
||||
|
@ -174,6 +188,7 @@ Page {
|
|||
_modelsLoaded = true;
|
||||
mediaLibraryModel.reload()
|
||||
userResumeModel.reload()
|
||||
showNextUpModel.reload()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue