[web] Remove quality and position properties when no values are available

This commit is contained in:
Alain Nussbaumer
2025-08-18 10:41:45 +10:00
parent 58593809f9
commit ea6388b51e
8 changed files with 31 additions and 25 deletions

View File

@@ -62,7 +62,9 @@ export default {
},
{
key: 'property.position',
value: [this.item.disc_number, this.item.track_number].join(' / ')
value:
this.item.track_number > 0 &&
[this.item.disc_number, this.item.track_number].join(' / ')
},
{
key: 'property.duration',
@@ -75,12 +77,14 @@ export default {
},
{
key: 'property.quality',
value: this.$t('dialog.track.quality-value', {
bitrate: this.item.bitrate,
count: this.item.channels,
format: this.item.type,
samplerate: this.item.samplerate
})
value:
this.item.data_kind !== 'spotify' &&
this.$t('dialog.track.quality', {
bitrate: this.item.bitrate,
count: this.item.channels,
format: this.item.type,
samplerate: this.item.samplerate
})
}
],
uri: this.item.uri

View File

@@ -66,7 +66,7 @@ export default {
key: 'property.quality',
value:
this.item.data_kind !== 'spotify' &&
this.$t('dialog.track.quality-value', {
this.$t('dialog.track.quality', {
bitrate: this.item.bitrate,
count: this.item.channels,
format: this.item.type,
@@ -79,7 +79,7 @@ export default {
},
{
key: 'property.rating',
value: this.$t('dialog.track.rating-value', {
value: this.$t('dialog.track.rating', {
rating: Math.floor(this.item.rating / 10)
})
},

View File

@@ -38,7 +38,9 @@ export default {
},
{
key: 'property.position',
value: [this.item.disc_number, this.item.track_number].join(' / ')
value:
this.item.track_number > 0 &&
[this.item.disc_number, this.item.track_number].join(' / ')
},
{
key: 'property.duration',

View File

@@ -70,15 +70,15 @@
}
},
"queue-item": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
},
"remote-pairing": {
"pairing-code": "Pairing-Code",
"title": "Remote-Paarungs-Anfrage"
},
"track": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating-value": "{rating} / 10"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating": "{rating} / 10"
},
"update": {
"all": "Alles neu einlesen",

View File

@@ -70,15 +70,15 @@
}
},
"queue-item": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
},
"remote-pairing": {
"pairing-code": "Pairing code",
"title": "Remote pairing request"
},
"track": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating-value": "{rating} / 10"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating": "{rating} / 10"
},
"update": {
"all": "Update everything",

View File

@@ -70,15 +70,15 @@
}
},
"queue-item": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
},
"remote-pairing": {
"pairing-code": "Code de jumelage",
"title": "Demande de jumelage de télécommande"
},
"track": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating-value": "{rating} / 10"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating": "{rating} / 10"
},
"update": {
"all": "Tout actualiser",

View File

@@ -70,15 +70,15 @@
}
},
"queue-item": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
},
"remote-pairing": {
"pairing-code": "配对码",
"title": "请求遥控配对"
},
"track": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating-value": "{rating} / 10"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating": "{rating} / 10"
},
"update": {
"all": "更新所有内容",

View File

@@ -70,15 +70,15 @@
}
},
"queue-item": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s"
},
"remote-pairing": {
"pairing-code": "配對碼",
"title": "請求遙控配對"
},
"track": {
"quality-value": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating-value": "{rating} / 10"
"quality": "{format} {'|'} {samplerate} Hz {'|'} @:data.channels {'|'} {bitrate} kbit/s",
"rating": "{rating} / 10"
},
"update": {
"all": "更新所有內容",