itunes-cli
itunes-cli copied to clipboard
Installation problem
$ go get github.com/lycoris0731/itunes-cli/itunes
# github.com/lycoris0731/itunes-cli/itunes
go/src/github.com/lycoris0731/itunes-cli/itunes/commands.go:81:55: invalid operation: c.Args()[0] (type cli.Args does not support indexing)
go/src/github.com/lycoris0731/itunes-cli/itunes/commands.go:131:33: invalid operation: c.Args()[0] (type cli.Args does not support indexing)
go/src/github.com/lycoris0731/itunes-cli/itunes/commands.go:155:38: invalid operation: c.Args()[0] (type cli.Args does not support indexing)
go/src/github.com/lycoris0731/itunes-cli/itunes/commands.go:182:38: invalid operation: c.Args()[0] (type cli.Args does not support indexing)
go/src/github.com/lycoris0731/itunes-cli/itunes/main.go:24:15: cannot use commands (type []cli.Command) as type []*cli.Command in assignment
- go version go1.15.7 darwin/amd64 (installed with homebrew)
- macOS 10.14.6 (Mojave)
- iTunes 12.9.5.5
Any suggestions?
Could you try installation by the following command?
$ go get github.com/ktr0731/itunes-cli/itunes
If you still get the same error message, please show me the results of the following command in the repository root.
$ go mod graph
Hello, if I change it to ktr0731
I get an identical set of errors… here's the graph:
~/go/src/github.com/ktr0731/itunes-cli/itunes (master) $ go mod graph
github.com/ktr0731/itunes-cli github.com/everdev/[email protected]
github.com/ktr0731/itunes-cli github.com/ktr0731/[email protected]
github.com/ktr0731/itunes-cli github.com/pkg/[email protected]
github.com/ktr0731/itunes-cli github.com/urfave/[email protected]
github.com/ktr0731/[email protected] github.com/google/[email protected]
github.com/ktr0731/[email protected] github.com/mattn/[email protected]
github.com/ktr0731/[email protected] github.com/nsf/[email protected]
github.com/ktr0731/[email protected] github.com/pkg/[email protected]
I don't know why the build fails because the provided graph is completely same as the my graph... I created a GitHub release, so could you try it out?
Hi. I'm not sure how to install that - I downloaded and extracted the .zip, changed to the directory, ran go install
and got:
no Go files in /Users/wt/itunes-cli-0.1.2
…even though they all seem to be there. (note this is the first time I've used go…)
It's just an executable binary. So, just place it under an execution path, and then it will be available.
…even though they all seem to be there. (note this is the first time I've used go…)
No problem :)
Thanks. (Sorry, I had downloaded the sourcecode again and not spotted the executable.)
I have play/pause etc. working fine now, but no fuzzy searching…
First I had the error about the missing ITUNES_CLI_FUZZY_TOOL env variable. So I went to https://github.com/ktr0731/go-fuzzyfinder/, didn't see any binaries of that, but ran get github.com/ktr0731/go-fuzzyfinder
, which completed successfully. Still wasn't sure which file to use, but saw this was newly created:
/Users/wt/go/pkg/darwin_amd64/github.com/ktr0731/go-fuzzyfinder.a
Tried making that executable and using that as ENV variable, nothing happens and no fuzzy UI.
As I have a working 'fzf' on my system (which can find all my iTunes files), I tried using that as well:
export ITUNES_CLI_FUZZY_TOOL='/usr/local/bin/fzf';
…restart terminal session, no errors, but again nothing.
Could try the following command? If there are no tracks, it means no tracks in iTunes (or there is a bug).
$ itunes list
Turns out it's all there, but it takes a whole minute for anything to appear (I've used unix time
to benchmark it a few times). Therefore, if I run iTunes find
normally and wait, go-fuzzyfinder works fine.
There are only 6,300 tracks (although using over 100GB) and my music library is in the standard location (macOS system language is set to French, but that doesn't affect paths on disk.) Using an SSD and I'm not aware of any file corruption. Does it read the iTunes library XML file at all? I could rebuild that unless you've any other suggestions…
ktr0731/itunes-cli
reads tracks by using AppleScript, so the seek speed depends on AppleScript. Also, currently, ktr0731/itunes-cli
doesn't have any cache mechanisms.
I'm not familiar with AppleScript, so I can't think of a way to speed it up right now...
Would a 'shell' feature be feasible? i.e. you startup iTunes-cli with a switch, it reads the tracks once, retains them in memory and gives you a prompt so you can perform multiple commands in succession (and also saves you having to type "itunes" every time).