KadoBOT / nvim-spotify

For productivity addicts who enjoy coding while listening to Spotify, and cannot lose their focus switching to the app to control their music.
GNU General Public License v3.0
182 stars 5 forks source link

error from telescope when pressing ctrl-y in searchbox #19

Open kimusan opened 2 years ago

kimusan commented 2 years ago

I wanted to search for playlists and tried with ctrl-y when the search box was open. It did change to the playlist searchbox but showed this error consistently:

[telescope] [WARN  11:25:49] ...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:467: Finder failed with msg:  ...site/pack/packer/start/nvim-spotify/lua/nvim-spotify.lua:54: attempt to concatenate a
nil value
{ "" }

searching for playlists did not work and gave this error (I searched for a word I know I have in a playlist):

E5108: Error executing lua ...site/pack/packer/start/nvim-spotify/lua/nvim-spotify.lua:72: attempt to concatenate field 'uri' (a nil value)
stack traceback:
        ...site/pack/packer/start/nvim-spotify/lua/nvim-spotify.lua:72: in function 'run_replace_or_original'
        ...packer/start/telescope.nvim/lua/telescope/actions/mt.lua:30: in function 'key_func'
        ...k/packer/start/telescope.nvim/lua/telescope/mappings.lua:235: in function 'execute_keymap'
        [string ":lua"]:1: in main chunk
KadoBOT commented 2 years ago

hey @kimusan you need to press ctrl+y after typing something in the search box, so it will search for a playlist using that input. I know that is not very clear but I'll improve that in a future version.

kimusan commented 2 years ago

Thanks that works. Would be nice to be able to "go back" to the search box again from the playlist results list so you can do search for X as song, find out you want to search for it as album instead, or maybe playlist....

KadoBOT commented 2 years ago

good one! I'll add your suggestion in the next update