[vlc-commits] [Git][videolan/vlc][master] qml/MusicAlbumsExpand: Add track count information
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Thu Oct 28 10:20:02 UTC 2021
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
32c618fa by Benjamin Arnaud at 2021-10-28T10:06:15+00:00
qml/MusicAlbumsExpand: Add track count information
fix #26037
- - - - -
1 changed file:
- modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
Changes:
=====================================
modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
=====================================
@@ -54,6 +54,15 @@ FocusScope {
playActionBtn.forceActiveFocus(reason);
}
+ function _getStringTrack() {
+ var count = Helpers.get(model, "nb_tracks", 0);
+
+ if (count < 2)
+ return i18n.qtr("%1 track").arg(count);
+ else
+ return i18n.qtr("%1 tracks").arg(count);
+ }
+
Rectangle {
anchors.fill: parent
color: VLCStyle.colors.expandDelegate
@@ -233,9 +242,10 @@ FocusScope {
id: expand_infos_subtitle_id
width: parent.width
- text: i18n.qtr("%1 - %2 - %3")
+ text: i18n.qtr("%1 - %2 - %3 - %4")
.arg(Helpers.get(model, "main_artist", i18n.qtr("Unknown artist")))
.arg(Helpers.get(model, "release_year", ""))
+ .arg(_getStringTrack())
.arg(Helpers.msToString(Helpers.get(model, "duration", 0)))
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/32c618fa337a7b1d25b66cd3fb0e631b0770f10e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/32c618fa337a7b1d25b66cd3fb0e631b0770f10e
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list