Fix #658: rework format for now playing status line
This commit is contained in:
@@ -556,18 +556,18 @@ func (a *NowPlayingPage) formatStatusLine() {
|
|||||||
util.SecondsToMMSS(playerStats.TimePos),
|
util.SecondsToMMSS(playerStats.TimePos),
|
||||||
util.SecondsToMMSS(dur))
|
util.SecondsToMMSS(dur))
|
||||||
}
|
}
|
||||||
status := fmt.Sprintf("%s (%d/%d)%s", state, trackNum,
|
status := fmt.Sprintf("%s (%d/%d)%s · %s: %s", state, trackNum,
|
||||||
len(a.queue), statusSuffix)
|
len(a.queue), statusSuffix, lang.L("Total time"), util.SecondsToTimeString(a.totalTime))
|
||||||
|
|
||||||
mediaInfo := ""
|
mediaInfo := ""
|
||||||
if state != stopped {
|
if state != stopped {
|
||||||
mediaInfo = a.formatMediaInfoStr(curPlayer)
|
mediaInfo = a.formatMediaInfoStr(curPlayer)
|
||||||
}
|
}
|
||||||
if mediaInfo != "" {
|
if mediaInfo != "" {
|
||||||
mediaInfo = " · " + mediaInfo
|
mediaInfo = " | " + mediaInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
a.statusLabel.Text = fmt.Sprintf("%s%s | %s: %s", status, mediaInfo, lang.L("Total time"), util.SecondsToTimeString(a.totalTime))
|
a.statusLabel.Text = fmt.Sprintf("%s%s", status, mediaInfo)
|
||||||
if lastStatus != a.statusLabel.Text {
|
if lastStatus != a.statusLabel.Text {
|
||||||
a.statusLabel.Refresh()
|
a.statusLabel.Refresh()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user