Skip to content

Commit

Permalink
feat: improve "UI/UX"
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloo27 committed May 14, 2024
1 parent 4e2548d commit fef6806
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions display/playlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import (
)

func ListPlaylists() {
if len(player.State.Data.Playlists) == 0 {
fmt.Printf(" %sNo playlists found%s\n", utils.ColorYellow, utils.ColorReset)
return
}

for i, playlist := range player.State.Data.Playlists {
bold := ""
if i%2 == 0 {
Expand Down
5 changes: 3 additions & 2 deletions mode/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
)

var (
playing chan bool
warning string
playing chan bool
warning string
searchSources = []search.SearchSource{search.SourceYouTube}
)

Expand All @@ -42,6 +42,7 @@ func promptEntry() {
fmt.Printf("%sPlaylists:\n", utils.ColorBlue)
display.ListPlaylists()
fmt.Printf("%sUse #<id> to start a playlist%s\n", utils.ColorBlue, utils.ColorReset)
fmt.Printf("%sSearch for %s/help%s to see the commands\n", utils.ColorBlue, utils.ColorYellow, utils.ColorBlue)

if warning != "" {
fmt.Printf("%s%s%s\n", utils.ColorYellow, warning, utils.ColorReset)
Expand Down

0 comments on commit fef6806

Please sign in to comment.