1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-11-25 18:35:17 +00:00

Improved episode and film UI

* Show track selection as disabled if there is only 1 option
* Series: show episode numbers
This commit is contained in:
Chris Josten 2020-09-27 21:11:50 +02:00
parent 6429ee5332
commit 419e97a882
2 changed files with 11 additions and 1 deletions

View file

@ -42,7 +42,15 @@ Column {
PlainLabel { PlainLabel {
id: tinyDetails id: tinyDetails
text: qsTr("Released: %1 — Run time: %2").arg(itemData.ProductionYear).arg(Utils.ticksToText(itemData.RunTimeTicks)) text: {
if (typeof itemData.IndexNumberEnd !== "undefined") {
qsTr("Episode %1%2 Season %3").arg(itemData.IndexNumber)
.arg(itemData.IndexNumberEnd)
.arg(itemData.ParentIndexNumber)
} else {
qsTr("Episode %1 Season %2").arg(itemData.IndexNumber).arg(itemData.ParentIndexNumber)
}
}
} }
PlainLabel { PlainLabel {

View file

@ -35,6 +35,7 @@ Column {
ComboBox { ComboBox {
id: audioSelector id: audioSelector
label: qsTr("Audio track") label: qsTr("Audio track")
enabled: audioModel.count > 1
menu: ContextMenu { menu: ContextMenu {
Repeater { Repeater {
model: audioModel model: audioModel
@ -49,6 +50,7 @@ Column {
ComboBox { ComboBox {
id: subitleSelector id: subitleSelector
label: qsTr("Subtitle track") label: qsTr("Subtitle track")
enabled: subtitleModel.count > 0
menu: ContextMenu { menu: ContextMenu {
MenuItem { MenuItem {
readonly property int _index: -1 readonly property int _index: -1