Closes #351: show reissue year in album page header
This commit is contained in:
@@ -3,6 +3,7 @@ package browsing
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
|
||||
"github.com/dweymouth/supersonic/backend"
|
||||
"github.com/dweymouth/supersonic/backend/mediaprovider"
|
||||
@@ -362,7 +363,11 @@ func formatMiscLabelStr(a *mediaprovider.AlbumWithTracks) string {
|
||||
if a.TrackCount == 1 {
|
||||
tracks = "track"
|
||||
}
|
||||
return fmt.Sprintf("%d · %d %s · %s%s", a.Year, a.TrackCount, tracks, discs, util.SecondsToTimeString(float64(a.Duration)))
|
||||
yearStr := strconv.Itoa(a.Year)
|
||||
if a.ReissueYear > a.Year {
|
||||
yearStr += fmt.Sprintf(" (reissued %d)", a.ReissueYear)
|
||||
}
|
||||
return fmt.Sprintf("%s · %d %s · %s%s", yearStr, a.TrackCount, tracks, discs, util.SecondsToTimeString(float64(a.Duration)))
|
||||
}
|
||||
|
||||
func (s *albumPageState) Restore() Page {
|
||||
|
||||
Reference in New Issue
Block a user