diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/footer.go | 4 | ||||
-rw-r--r-- | src/page_artists.go | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/footer.go b/src/footer.go index 1db1843..96b0aa3 100644 --- a/src/footer.go +++ b/src/footer.go | |||
@@ -7,8 +7,8 @@ func (a *app) updateFooter() { | |||
7 | case "playqueue": | 7 | case "playqueue": |
8 | a.footer.SetText("[blue]l:[yellow] Next song [blue]p:[yellow] Toggle pause [blue]d:[yellow] Remove [blue]j:[yellow] Move up [blue]k:[yellow] Move down") | 8 | a.footer.SetText("[blue]l:[yellow] Next song [blue]p:[yellow] Toggle pause [blue]d:[yellow] Remove [blue]j:[yellow] Move up [blue]k:[yellow] Move down") |
9 | case "playlists": | 9 | case "playlists": |
10 | a.footer.SetText("Come back later!") | 10 | a.footer.SetText("") |
11 | case "config": | 11 | case "config": |
12 | a.footer.SetText("Configuration page") | 12 | a.footer.SetText("") |
13 | } | 13 | } |
14 | } | 14 | } |
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) |