Giter Site home page Giter Site logo

aditya-k2 / gspt Goto Github PK

View Code? Open in Web Editor NEW
227.0 8.0 2.0 2.34 MB

Spotify for the terminal written in Go

License: GNU General Public License v3.0

Go 98.87% Makefile 1.13%
golang spotify spotify-api spotify-client spotify-clone spotify-tui terminal terminal-based tui tui-app

gspt's Introduction

aditya-K2 (Aditya Kurdunkar)

Project Showcase

  • gspt - Spotify for terminal written in Go.
  • scandoc - A GTK Application to scan Documents and Compile PDFs
  • brow - A simple terminal utility to get browser history
  • gomp - A terminal client for MPD with native cover-art rendering capabilities
Others

gspt's People

Contributors

aditya-k2 avatar anhdev-hanet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gspt's Issues

Index out of range

Hi there, I got a new index out of range error. The program now boots to UI, but then gives this error:

panic: runtime error: index out of range [-21]
goroutine 84 [running]:
github.com/nfnt/resize.resizeYCbCr(0xc000334140, 0xc000120140, 0x0?, {0xc000089570?, 0x32, 0x0?}, {0xc0003571e0, 0x19, 0x0?}, 0x0?)
github.com/nfnt/[email protected]/converter.go:374 +0x426
github.com/nfnt/resize.Resize.func5()
github.com/nfnt/[email protected]/resize.go:185 +0x93
created by github.com/nfnt/resize.Resize
github.com/nfnt/[email protected]/resize.go:183 +0x1e8a

panic: runtime error: index out of range [-3]
goroutine 93 [running]:
github.com/nfnt/resize.resizeYCbCr(0xc000334140, 0xc000120410, 0x0?, {0xc000089570?, 0x32, 0x0?}, {0xc0003571e0, 0x19, 0x0?}, 0x0?)
github.com/nfnt/[email protected]/converter.go:374 +0x426
github.com/nfnt/resize.Resize.func5()
github.com/nfnt/[email protected]/resize.go:185 +0x93
created by github.com/nfnt/resize.Resize
github.com/nfnt/[email protected]/resize.go:183 +0x1e8a

It also complains about no config at ~/.config/gspt just before the ui opens, idk if that is related.

Player command failed: No active device found

I installed the pre-built arm64 binary on an Raspberry Pi 3B+ running Bookworm and went through the spotify app registration steps. gspt runs and opens to show all my playlists but if I try to play anything I get a notification: Player command failed: No active device found
No configuration so far, but how to handle this isn't in README.md
What can I do?

Index out of range error

Hi there, I tried to run this program.
I logged in with the URL it gave me, this seemed successful.
But after that the program throws this error:

panic: runtime error: index out of range [0] with length 0 [recovered]
	panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1()
	github.com/rivo/[email protected]/application.go:244 +0x4d
panic({0x562142ff6640, 0xc000028300})
	runtime/panic.go:884 +0x212
github.com/aditya-K2/gspt/ui.(*TopTracksView).Content.func1()
	github.com/aditya-K2/gspt/ui/view_top.go:45 +0x6f3
github.com/aditya-K2/gspt/ui.(*interactiveView).update(0xc00011c400)
	github.com/aditya-K2/gspt/ui/interactive.go:231 +0x7b
github.com/aditya-K2/gspt/ui.NewInteractiveView.func1({0x10000000f?, 0x0?}, 0x0?, 0x0?, 0x0?, 0xc000005180?)
	github.com/aditya-K2/gspt/ui/interactive.go:44 +0x25
github.com/rivo/tview.(*Box).DrawForSubclass(0xc0002c6000, {0x56214302bf98, 0xc000005180}, {0x56214302aaa0?, 0xc00013a300?})
	github.com/rivo/[email protected]/box.go:399 +0x252
github.com/rivo/tview.(*Table).Draw(0xc00013a300, {0x56214302bf98, 0xc000005180})
	github.com/rivo/[email protected]/table.go:837 +0x56
github.com/rivo/tview.(*Flex).Draw(0xc000494720, {0x56214302bf98?, 0xc000005180})
	github.com/rivo/[email protected]/flex.go:200 +0x3a5
github.com/rivo/tview.(*Flex).Draw(0xc0004947b0, {0x56214302bf98?, 0xc000005180})
	github.com/rivo/[email protected]/flex.go:200 +0x3a5
github.com/rivo/tview.(*Flex).Draw(0xc000494840, {0x56214302bf98?, 0xc000005180})
	github.com/rivo/[email protected]/flex.go:200 +0x3a5
github.com/rivo/tview.(*Pages).Draw(0xc00009f980, {0x56214302bf98, 0xc000005180})
	github.com/rivo/[email protected]/pages.go:279 +0xda
github.com/rivo/tview.(*Application).draw(0xc00020c000)
	github.com/rivo/[email protected]/application.go:604 +0x15a
github.com/rivo/tview.(*Application).Run(0xc00020c000)
	github.com/rivo/[email protected]/application.go:250 +0x13e
main.main()
	github.com/aditya-K2/gspt/main.go:12 +0x31

My system is running the latest version of Fedora.

Got this error after running it

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x678eae]

goroutine 1 [running]:
github.com/aditya-K2/gspt/spt.GetTopTracks()
/home/edw4rd/gspt/spt/get.go:269 +0x6e
github.com/aditya-K2/gspt/ui.(*TopTracksView).RefreshState(0xc0000385c0)
/home/edw4rd/gspt/ui/view_top.go:24 +0x25
github.com/aditya-K2/gspt/ui.NewApplication()
/home/edw4rd/gspt/ui/app.go:51 +0x372
main.main()
/home/edw4rd/gspt/main.go:12 +0x29`

Can't type d into search bar

Doesn't seem like d to deivce select is unbound when typing into the search bar, so trying to type anything with d opens device select instead

Problem installing

Hi, i'm having some trouble with installing. I'm on MacOS and this my first time using Go. I installed it using the official installer from www.golang.org. I git cloned the repo, but when I try to go build -v I get this error:

main.go:4:2: cannot find package "github.com/aditya-K2/gspt/config" in any of:
        /usr/local/go/src/github.com/aditya-K2/gspt/config (from $GOROOT)
        /~/go/src/github.com/aditya-K2/gspt/config (from $GOPATH)
main.go:5:2: cannot find package "github.com/aditya-K2/gspt/spt" in any of:
        /usr/local/go/src/github.com/aditya-K2/gspt/spt (from $GOROOT)
        /~/go/src/github.com/aditya-K2/gspt/spt (from $GOPATH)
main.go:6:2: cannot find package "github.com/aditya-K2/gspt/ui" in any of:
        /usr/local/go/src/github.com/aditya-K2/gspt/ui (from $GOROOT)
        /~/go/src/github.com/aditya-K2/gspt/ui (from $GOPATH)

I haven't set $GOROOT but my $GOPATH is /~/go. Any idea what I'm doing wrong? thanks in advance.

using `/` instead of `?`

I just downloaded it today. Great job!

Since the Vim key-bindingsis being used (jk) that would be nice if we use / instead of ? to search the tracks. And use ? to show the help/default key-bindings.

I keep getting an error when i try to run gspt

it seemingly gave me no issue installing to my machine. But after i add my SPOTIFY_SECRET and SPOTIFY_ID to my .bashrc, it tells me they are missing. I even put it in the .zshrc and switched to zsh and it still persisted.

` panic: SPOTIFY_ID and/or SPOTIFY_SECRET are missing. Please make sure you have set the SPOTIFY_ID and SPOTIFY_SECRET environment variables

goroutine 1 [running]:
main.main()
github.com/aditya-K2/gspt/main.go:12 +0x56
`

installing on mac : illegal option -D

Screenshot 2023-04-27 at 22 21 52

on mac os Ventura running sudo install -D gspt -t "/usr/bin/" command it says illegal option --D so I changed it to -d and this says gspt exist but is not a directory.

Could not read config file and sptofiy secret and id missing

I get the following error

Could Not Read Config file.
2024/02/03 16:55:25 error: Config File "config" Not Found in "[/home/Umar/.config/gspt]"
panic: SPOTIFY_ID and/or SPOTIFY_SECRET are missing. Please make sure you have set the SPOTIFY_ID and SPOTIFY_SECRET environment variables

goroutine 1 [running]:
main.main()
	github.com/aditya-K2/gspt/main.go:14 +0x57

I have put the client id and secret as in the install instruction
image

any idea

INVALID_CLIENT: Invalid Client

Anyways, after i went through the steps again, and it seems like it will work. It gives me a log in link, but the link takes me to a blank white page with the words "INVALID_CLIENT: Invalid client"

Originally posted by @Gizmorod in #21 (comment)

XGB: conn.go:47: Could not get authority info: EOF

Hi.
I'm on Manjaro with Hyprland.

I followed the instructions and compiled the software without errors.

Finally I copied the gspt executable to /usr/bin, created a new "client id & secret" and ran the program. The player works but it shows me this error and I don't see the album images.

https://imgur.com/5jbdrRX

I also noticed a strange thing. In my user's .config folder there is no .config/gspt folder but there is only .config/gspot with these files inside:

ls -l ~/.config/gspot                                                         
.rwxr-xr-x 566 riccardo 15 apr 11:25 ๏€– oauthtoken

empty display string

Screenshot 2023-04-27 at 23 25 11

when I play music by hit enter, alert says "empty display string" and "No device found"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.