diff options
Diffstat (limited to 'src/page_artists.go')
-rw-r--r-- | src/page_artists.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/page_artists.go b/src/page_artists.go index 104fdc7..6cbaee1 100644 --- a/src/page_artists.go +++ b/src/page_artists.go | |||
@@ -2,7 +2,6 @@ package src | |||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | "time" | ||
6 | 5 | ||
7 | "github.com/delucks/go-subsonic" | 6 | "github.com/delucks/go-subsonic" |
8 | "github.com/gdamore/tcell/v2" | 7 | "github.com/gdamore/tcell/v2" |
@@ -41,7 +40,7 @@ func (a *app) artistsPage() tview.Primitive { | |||
41 | 40 | ||
42 | // Songs list for the selected album | 41 | // Songs list for the selected album |
43 | a.songsList = tview.NewList() | 42 | a.songsList = tview.NewList() |
44 | a.songsList.ShowSecondaryText(false) | 43 | a.songsList.ShowSecondaryText(false).SetHighlightFullLine(true) |
45 | a.songsList.SetBorderAttributes(tcell.AttrDim).SetBorder(true) | 44 | a.songsList.SetBorderAttributes(tcell.AttrDim).SetBorder(true) |
46 | 45 | ||
47 | // Change the left-right keys to switch between the panels | 46 | // Change the left-right keys to switch between the panels |
@@ -124,9 +123,9 @@ func (a *app) loadAlbumInPanel(id string) error { | |||
124 | songsCopy := make([]*subsonic.Child, len(songs)) | 123 | songsCopy := make([]*subsonic.Child, len(songs)) |
125 | copy(songsCopy, songs) | 124 | copy(songsCopy, songs) |
126 | 125 | ||
127 | dur := time.Duration(song.Duration) * time.Second | 126 | txt := fmt.Sprintf("%-2d - %s", song.Track, song.Title) |
128 | 127 | ||
129 | a.songsList.InsertItem(0, fmt.Sprintf("%-10s %d - %s", fmt.Sprintf("[%s]", dur.String()), song.Track, song.Title), "", 0, func() { | 128 | a.songsList.InsertItem(0, txt, "", 0, func() { |
130 | a.playQueue.Clear() | 129 | a.playQueue.Clear() |
131 | for _, s := range songsCopy { | 130 | for _, s := range songsCopy { |
132 | a.playQueue.Append(s) | 131 | a.playQueue.Append(s) |