1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-06 02:32:44 +00:00

Add better playlist view

I reused the AlbumDetailPage for playlists, as both are very similar. If
they end up being too different, I might want to look into splitting
them up, but for now it will do.
This commit is contained in:
Chris Josten 2022-07-23 01:52:26 +02:00
parent c1e402f411
commit 4a178ee227
No known key found for this signature in database
GPG key ID: A69C050E9FD9FF6A
4 changed files with 41 additions and 16 deletions

View file

@ -37,6 +37,7 @@ Item {
property alias blurhash : albumArtImage.blurhash
property bool twoColumns
property real aspectRatio
property string type
readonly property real smallSize: albumHeader.height
readonly property real bigSize: listHeader.width / aspectRatio
@ -101,12 +102,22 @@ Item {
width: parent.width - Theme.horizontalPageMargin - height
title: name
//: Short description of the album: %1 -> album artist, %2 -> amount of songs, %3 -> duration, %4 -> release year
description: qsTr("%1\n%2 songs | %3 | %4")
.arg(albumArtist)
.arg(songCount)
.arg(Utils.ticksToText(duration))
//: Unknown album release year
.arg(releaseYear >= 0 ? releaseYear : qsTr("Unknown year"))
description: {
if (type == "MusicAlbum") {
//: Short description of the album: %1 -> album artist, %2 -> amount of songs, %3 -> duration, %4 -> release year
qsTr("%1\n%2 songs | %3 | %4")
.arg(albumArtist)
.arg(songCount)
.arg(Utils.ticksToText(duration))
//: Unknown album release year
.arg(releaseYear >= 0 ? releaseYear : qsTr("Unknown year"))
} else {
qsTr("Playlist\n%1 songs | %2")
.arg(songCount)
.arg(Utils.ticksToText(duration))
}
}
}
RemoteImage {