Fixes to playlist time
This commit is contained in:
parent
bc31a30a66
commit
e23e7a6fe1
2 changed files with 8 additions and 2 deletions
|
@ -117,6 +117,10 @@
|
||||||
"term.equalizer": "Equalizer",
|
"term.equalizer": "Equalizer",
|
||||||
"term.reset": "Reset",
|
"term.reset": "Reset",
|
||||||
"term.tracks": "tracks",
|
"term.tracks": "tracks",
|
||||||
|
"term.track": {
|
||||||
|
"one" : "track",
|
||||||
|
"other" : "tracks"
|
||||||
|
},
|
||||||
"term.videos": "Videos",
|
"term.videos": "Videos",
|
||||||
"term.menu": "Menu",
|
"term.menu": "Menu",
|
||||||
"term.check": "Check",
|
"term.check": "Check",
|
||||||
|
|
|
@ -1373,7 +1373,9 @@ const app = new Vue({
|
||||||
const longFormat = []
|
const longFormat = []
|
||||||
|
|
||||||
// Seconds
|
// Seconds
|
||||||
longFormat.push(`${datetime.getSeconds()} ${app.getLz('term.time.second', options = {count: datetime.getSeconds()})}`)
|
if (datetime.getSeconds() !== 0) {
|
||||||
|
longFormat.push(`${datetime.getSeconds()} ${app.getLz('term.time.seconds')}`)
|
||||||
|
}
|
||||||
|
|
||||||
// Minutes
|
// Minutes
|
||||||
if (time >= 60) {
|
if (time >= 60) {
|
||||||
|
@ -2356,7 +2358,7 @@ const app = new Vue({
|
||||||
try {
|
try {
|
||||||
if (app.showingPlaylist.relationships.tracks.data.length > 0) {
|
if (app.showingPlaylist.relationships.tracks.data.length > 0) {
|
||||||
const timeInSeconds = Math.round([].concat(...app.showingPlaylist.relationships.tracks.data).reduce((a, {attributes: {durationInMillis}}) => a + durationInMillis, 0) / 1000);
|
const timeInSeconds = Math.round([].concat(...app.showingPlaylist.relationships.tracks.data).reduce((a, {attributes: {durationInMillis}}) => a + durationInMillis, 0) / 1000);
|
||||||
return `${app.showingPlaylist.relationships.tracks.data.length} ${app.getLz('term.tracks', options = {count: app.showingPlaylist.relationships.tracks.data.length})}, ${this.convertTime(timeInSeconds, 'long')}`
|
return `${app.showingPlaylist.relationships.tracks.data.length} ${app.getLz('term.track', options = {count: app.showingPlaylist.relationships.tracks.data.length})}, ${this.convertTime(timeInSeconds, 'long')}`
|
||||||
} else return ""
|
} else return ""
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return ""
|
return ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue