mirror of
https://github.com/aditya-K2/gspt.git
synced 2026-01-07 21:13:50 -05:00
Renaming
This commit is contained in:
@@ -305,11 +305,11 @@ func NewApplication() *tview.Application {
|
||||
}))
|
||||
topTracksView.SetActions(utils.MergeMaps(globalActions, map[string]*Action{
|
||||
"play_entry": NewAction(func(e *tcell.EventKey) *tcell.EventKey {
|
||||
topTracksView.PlaySelectedEntry()
|
||||
topTracksView.PlayEntry()
|
||||
return nil
|
||||
}, progressBar),
|
||||
"queue_entry": NewAction(func(e *tcell.EventKey) *tcell.EventKey {
|
||||
topTracksView.QueueSelectedEntry()
|
||||
topTracksView.QueueEntry()
|
||||
return nil
|
||||
}, nil),
|
||||
}))
|
||||
@@ -343,7 +343,7 @@ func NewApplication() *tview.Application {
|
||||
return nil
|
||||
}, progressBar),
|
||||
"queue_entry": NewAction(func(e *tcell.EventKey) *tcell.EventKey {
|
||||
albumsView.QueueSelectEntry()
|
||||
albumsView.QueueEntry()
|
||||
return nil
|
||||
}, progressBar),
|
||||
}))
|
||||
|
||||
@@ -59,7 +59,7 @@ func (a *AlbumsView) PlayEntry() {
|
||||
}
|
||||
}
|
||||
|
||||
func (a *AlbumsView) QueueSelectEntry() {
|
||||
func (a *AlbumsView) QueueEntry() {
|
||||
r, _ := Main.GetSelection()
|
||||
alb := (*a.savedAlbums)[r]
|
||||
msg := SendNotificationWithChan("Queueing " + alb.Name + "...")
|
||||
|
||||
@@ -74,7 +74,7 @@ func (a *TopTracksView) handle(trackHandler, artistHandler func(r int)) {
|
||||
}
|
||||
}
|
||||
|
||||
func (a *TopTracksView) PlaySelectedEntry() {
|
||||
func (a *TopTracksView) PlayEntry() {
|
||||
a.handle(nil, func(r int) {
|
||||
if err := spt.PlayContext(a.topArtists[r-1].URI); err != nil {
|
||||
SendNotification(err.Error())
|
||||
@@ -96,7 +96,7 @@ func (a *TopTracksView) OpenEntry() {
|
||||
a.handle(trackHandler, artistHandler)
|
||||
}
|
||||
|
||||
func (a *TopTracksView) QueueSelectedEntry() {
|
||||
func (a *TopTracksView) QueueEntry() {
|
||||
a.handle(func(r int) {
|
||||
msg := fmt.Sprintf("%s Queued Succesfully!", a.topTracks[r-2-len(a.topArtists)].Name)
|
||||
if err := spt.QueueTracks(a.topTracks[r-2-len(a.topArtists)].ID); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user