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

Add navigation to artists from tracks

I'm not to happy about the C++ sides. If anyone from the future finds
this commit with "git blame" while debugging this code: I apologise
This commit is contained in:
Chris Josten 2022-07-30 01:16:40 +02:00
parent 3f9661ccb5
commit 0fafb19c7d
14 changed files with 185 additions and 5 deletions

View file

@ -93,7 +93,7 @@ BaseDetailPage {
delegate: SongDelegate {
id: songDelegate
name: model.name
artists: model.artists
artists: model.artistItems
duration: model.runTimeTicks
indexNumber: itemData.type === "MusicAlbum" ? model.indexNumber : index + 1
onClicked: window.playbackManager.playItemInList(collectionModel, model.index)

View file

@ -19,6 +19,15 @@ BaseDetailPage {
SilicaFlickable {
anchors.fill: parent
contentHeight: content.height
Component {
id: latestMediaLoaderComponent
J.LatestMediaLoader {
apiClient: appWindow.apiClient
parentId: itemData.jellyfinId
includeItemTypes: "Audio"
autoReload: false
}
}
Component {
id: albumArtistLoaderComponent
@ -64,7 +73,6 @@ BaseDetailPage {
text: qsTr("Recently added")
//collapseWhenEmpty: false
extraBusy: !_firstTimeLoaded
clickable: false
loader: J.LatestMediaLoader {
apiClient: appWindow.apiClient
parentId: itemData.jellyfinId
@ -72,6 +80,12 @@ BaseDetailPage {
includeItemTypes: "Audio"
limit: 12
}
onHeaderClicked: pageStack.push(Qt.resolvedUrl("CollectionPage.qml"), {
"loader": latestMediaLoaderComponent.createObject(musicLibraryPage),
//: Page title for the list of all albums within the music library
"pageTitle": qsTr("Latest media"),
"allowSort": false
})
}