kimtore / pms

Practical Music Search is an interactive Vim-like console client for the Music Player Daemon.
https://ambientsound.github.io/pms/
MIT License
249 stars 23 forks source link

Support mopidy #113

Open GijsTimmers opened 6 years ago

GijsTimmers commented 6 years ago

I'm using pms v0.42 on Ubuntu 17.10.

pms works nicely with mpd, but doesn't with mopidy. The main problem is that tracks don't show up in the library.

It would be nice if pms supported mopidy.

kimtore commented 6 years ago

Hi @GijsTimmers.

Mopidy support is definitely a feature I'd like to implement some time soon, but version 0.42 is unsupported and there is not going to be any further development on that branch. Maybe you'd like to try the current git master instead and see how it works?

GijsTimmers commented 6 years ago

Hi @ambientsound, thanks for your quick response. I will try that out first.

kimtore commented 6 years ago

Hi again, Did you have any luck using master with Mopidy?

GijsTimmers commented 6 years ago

Hello Kim,

Haven't tried it in the meantime tbh. Still interested though.

2018-06-11 11:40 GMT+02:00 Kim Tore Jensen notifications@github.com:

Hi again, Did you have any luck using master with Mopidy?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ambientsound/pms/issues/113#issuecomment-396184291, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7WGlkqGOKN4RU5GAnDdFy1CztRPsBeks5t7jsegaJpZM4SvJqY .

dvdmuckle commented 5 years ago

Can confirm that master of pms does not work with Mopidy right now, and will instead spit out:

Practical Music Search 86649eb
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x858f0f]

goroutine 100 [running]:
github.com/ambientsound/pms/index.(*Index).IndexFull(0x0, 0xf27338, 0x0, 0x0, 0xc00022e000, 0x0, 0x0)
    /home/dvdmuckle/Go/src/github.com/ambientsound/pms/index/index.go:175 +0xdf
github.com/ambientsound/pms/songlist.(*Library).ReIndex.func1(0xc0001723f0)
    /home/dvdmuckle/Go/src/github.com/ambientsound/pms/songlist/library.go:109 +0x8d
created by github.com/ambientsound/pms/songlist.(*Library).ReIndex
    /home/dvdmuckle/Go/src/github.com/ambientsound/pms/songlist/library.go:107 +0x92

However, and this is interesting, if I start pms with a running instance of mpd, kill the mpd instance, then start Mopidy, pms is at least able to list the songs currently in the queue, even if the songs are from a remote source like Spotify.

dvdmuckle commented 5 years ago

Well, it looked like what little I was able to get working was a fluke, as I can't reproduce it now.

dvdmuckle commented 5 years ago

Well, I was able to get it so I can switch tracks in the current queue, which was added from another client.

kimtore commented 5 years ago

This error might signify that PMS was not able to pull a full copy of the song library from MPD. This makes sense since this information might not be available from Mopidy. Because PMS' search is based on having this information stored locally, a bigger refactor will be needed in order to fully support searching through Mopidy.

dvdmuckle commented 5 years ago

That sounds about right, especially considering if other music backends like Spotify are enabled, which present a very large library to look through.