Skip to content

Commit

Permalink
Neither gonic nor Navidrome support lyrics (yet), so this branch is a…
Browse files Browse the repository at this point in the history
…n aborted start at support.
  • Loading branch information
xxxserxxx committed Dec 18, 2024
1 parent 4a8428b commit db1c4ab
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions page_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ type QueuePage struct {
queueData queueData

songInfo *tview.TextView
lyrics *tview.TextView
coverArt *tview.Image

changeLyrics chan string

// external refs
ui *Ui
logger logger.LoggerInterface
Expand Down Expand Up @@ -149,13 +152,20 @@ func (ui *Ui) createQueuePage() *QueuePage {
return action, nil
})

queuePage.lyrics = tview.NewTextView()
queuePage.lyrics.SetBorder(true)
queuePage.lyrics.SetTitle(" lyrics ")
queuePage.lyrics.SetTitleAlign(tview.AlignCenter)
queuePage.lyrics.SetDynamicColors(true).SetScrollable(true)

queuePage.queueList.SetSelectionChangedFunc(queuePage.changeSelection)

queuePage.coverArt = tview.NewImage()
queuePage.coverArt.SetImage(STMPS_LOGO)

infoFlex := tview.NewFlex().SetDirection(tview.FlexRow).
AddItem(queuePage.songInfo, 0, 1, false).
AddItem(queuePage.lyrics, 0, 1, false).
AddItem(queuePage.coverArt, 0, 1, false)
infoFlex.SetBorder(true)
infoFlex.SetTitle(" song info ")
Expand All @@ -170,6 +180,15 @@ func (ui *Ui) createQueuePage() *QueuePage {
starIdList: ui.starIdList,
}

go func() {
for {
select {
case songId := <-queuePage.changeLyrics:
// queuePage.connection.GetLyrics(songId)
}
}
}()

return &queuePage
}

Expand Down

0 comments on commit db1c4ab

Please sign in to comment.