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