mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-05 10:12:46 +00:00
Fix a few bugs and unimplemented features
* Show the now playing cover when playing an item, otherwise show the collection cover. * ItemModelLoaders now correctly expose list properties of non-built-in Qt objects * toString is now implemented for lists, fixing some query construction code. * PlaybackManager now clears the playlist when playing a single item to prevent weird behaviour. * The covers are slightly updated.
This commit is contained in:
parent
60bc90c5fa
commit
caf72af999
19 changed files with 179 additions and 81 deletions
|
@ -30,6 +30,8 @@ import "../"
|
|||
Page {
|
||||
/// True if the models on this page already have been loaded and don't necessarily need a refresh
|
||||
property bool _modelsLoaded: false
|
||||
// Only for cover page
|
||||
readonly property string itemId: ""
|
||||
|
||||
id: mainPage
|
||||
allowedOrientations: Orientation.All
|
||||
|
@ -48,7 +50,7 @@ Page {
|
|||
text: qsTr("Reload")
|
||||
onClicked: loadModels(true)
|
||||
}
|
||||
busy: mediaLibraryLoader.status === J.UsersViewsLoader.Loading
|
||||
busy: mediaLibraryLoader.status === J.ModelStatus.Loading
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,7 +82,7 @@ Page {
|
|||
//- Section header for films and TV shows that an user hasn't completed yet.
|
||||
text: qsTr("Resume watching")
|
||||
clickable: false
|
||||
busy: userResumeLoader.status === J.UsersViewsLoader.Loading
|
||||
busy: userResumeLoader.status === J.ModelStatus.Loading
|
||||
Loader {
|
||||
width: parent.width
|
||||
sourceComponent: carrouselView
|
||||
|
@ -102,7 +104,7 @@ Page {
|
|||
//- Section header for next episodes in a TV show that an user was watching.
|
||||
text: qsTr("Next up")
|
||||
clickable: false
|
||||
//busy: showNextUpModel.status === .Loading
|
||||
busy: showNextUpLoader.status === J.ModelStatus.Loading
|
||||
|
||||
Loader {
|
||||
width: parent.width
|
||||
|
@ -112,8 +114,11 @@ Page {
|
|||
|
||||
J.ItemModel {
|
||||
id: showNextUpModel
|
||||
/*apiClient: appWindow.apiClient
|
||||
limit: 12*/
|
||||
loader: J.NextUpLoader {
|
||||
id: showNextUpLoader
|
||||
apiClient: appWindow.apiClient
|
||||
enableUserData: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ Page {
|
|||
if (status === PageStatus.Active) {
|
||||
console.log("Page ready, ItemID: ", itemId, ", UserID: ", apiClient.userId)
|
||||
jItemLoader.autoReload = true
|
||||
//appWindow.itemData = jItemLoader.data
|
||||
appWindow.itemData = Qt.binding(function() { return jItemLoader.data; })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue