mirror of
https://github.com/aditya-K2/gspt.git
synced 2026-01-07 21:13:50 -05:00
Minor Changes
This commit is contained in:
@@ -33,14 +33,14 @@ func (a *AlbumView) Content() func() [][]Content {
|
||||
|
||||
if a.currentAlbumID != nil {
|
||||
if a.currentFullAlbum == nil {
|
||||
msg := SendNotificationWithChan("Loading %s....", a.currentAlbumName)
|
||||
msg := SendNotificationWithChan("Fetching %s....", a.currentAlbumName)
|
||||
al, ch := spt.GetAlbum(*a.currentAlbumID)
|
||||
go func() {
|
||||
err := <-ch
|
||||
if err != nil {
|
||||
msg <- err.Error()
|
||||
} else {
|
||||
msg <- "Album Loaded Succesfully!"
|
||||
msg <- "Album Fetched Succesfully!"
|
||||
}
|
||||
}()
|
||||
a.currentFullAlbum = al
|
||||
|
||||
@@ -21,7 +21,7 @@ func (a *AlbumsView) Content() func() [][]Content {
|
||||
return func() [][]Content {
|
||||
c := make([][]Content, 0)
|
||||
if a.savedAlbums == nil {
|
||||
msg := SendNotificationWithChan("Loading Albums from your Library...")
|
||||
msg := SendNotificationWithChan("Fetching Albums from your Library...")
|
||||
sa, ch := spt.CurrentUserSavedAlbums()
|
||||
go func() {
|
||||
err := <-ch
|
||||
|
||||
@@ -32,7 +32,7 @@ func (a *ArtistView) SetArtist(id *spotify.ID) {
|
||||
}
|
||||
|
||||
func (a *ArtistView) RefreshState() {
|
||||
msg := SendNotificationWithChan("Loading Artist!")
|
||||
msg := SendNotificationWithChan("Fetching Artist....")
|
||||
topTracks, err := spt.GetArtistTopTracks(*a.artistID)
|
||||
if err != nil {
|
||||
msg <- ("Error retrieving Artist Top Tracks: " + err.Error())
|
||||
@@ -45,7 +45,7 @@ func (a *ArtistView) RefreshState() {
|
||||
return
|
||||
}
|
||||
a.albums = albums
|
||||
msg <- "Artist Loaded Succesfully!"
|
||||
msg <- "Artist Fetched Succesfully!"
|
||||
}
|
||||
|
||||
func (a *ArtistView) Content() func() [][]Content {
|
||||
|
||||
@@ -21,7 +21,7 @@ func (a *ArtistsView) Content() func() [][]Content {
|
||||
return func() [][]Content {
|
||||
c := make([][]Content, 0)
|
||||
if a.followedArtists == nil {
|
||||
msg := SendNotificationWithChan("Loading Artists from your Library...")
|
||||
msg := SendNotificationWithChan("Fetching Artists from your Library...")
|
||||
fa, ch := spt.CurrentUserFollowedArtists()
|
||||
go func() {
|
||||
err := <-ch
|
||||
|
||||
@@ -25,13 +25,13 @@ func (p *LikedSongsView) Content() func() [][]Content {
|
||||
return func() [][]Content {
|
||||
c := make([][]Content, 0)
|
||||
if p.likedSongs == nil {
|
||||
msg := SendNotificationWithChan("Loading Liked Songs...")
|
||||
msg := SendNotificationWithChan("Fetching Liked Songs...")
|
||||
p.refreshState(func(err error) {
|
||||
if err != nil {
|
||||
msg <- err.Error()
|
||||
return
|
||||
}
|
||||
msg <- "Liked Songs Loaded Succesfully!"
|
||||
msg <- "Liked Songs Fetched Succesfully!"
|
||||
})
|
||||
}
|
||||
if p.likedSongs != nil {
|
||||
|
||||
@@ -31,14 +31,14 @@ func (p *PlaylistView) Content() func() [][]Content {
|
||||
c := make([][]Content, 0)
|
||||
if p.currentPlaylist != nil {
|
||||
if p.currentUserFullPlaylist == nil {
|
||||
msg := SendNotificationWithChan("Loading %s....", p.currentPlaylist.Name)
|
||||
msg := SendNotificationWithChan("Fetching %s....", p.currentPlaylist.Name)
|
||||
pf, ch := spt.GetPlaylist(p.currentPlaylist.ID)
|
||||
go func() {
|
||||
err := <-ch
|
||||
if err != nil {
|
||||
msg <- err.Error()
|
||||
} else {
|
||||
msg <- "Playlist Loaded Succesfully!"
|
||||
msg <- "Playlist Fetched Succesfully!"
|
||||
}
|
||||
}()
|
||||
p.currentUserFullPlaylist = pf
|
||||
|
||||
Reference in New Issue
Block a user