How do you all use beets with MPD

624 views
Skip to first unread message

Bearcat Şándor

unread,
Jan 17, 2016, 9:19:36 PM1/17/16
to beets
For those of you that are mpd and beets users, how to you bring the two together. At some point i'd like to take a shot at bringing BPD upto date, but until then how do i use them without going nuts? Anyway to bring beet play into the mix?

Peter Jones

unread,
Jan 19, 2016, 1:16:40 PM1/19/16
to beets...@googlegroups.com
Bearcat Şándor <bearca...@gmail.com>
writes:
Other than telling mpd where your files are, there shouldn't be anything
else to do. As for `beet play`, here is my config:

play:
relative_to: ~/documents/music
command: bash -c 'cat $0 | mpc add'

--
Peter Jones, Founder, Devalot.com
Defending the honor of good code

Samuel Loury

unread,
Jan 23, 2016, 12:39:24 PM1/23/16
to Bearcat Şándor, beets
I have tried mopidy and mopidy-beets for one week now, it looks like it works
well. Mopidy talks the MPD protocl, so you can control it from a MPD
client like MPC. Mopidy-beets is a plugin of mopidy that uses beet web to
search through musics and play it.

--
Konubinix
GPG Key : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A
signature.asc

Bearcat Şándor

unread,
Jan 26, 2016, 2:25:09 AM1/26/16
to beets
 
Samuel, thank you for introducing me to mopidy. It's awesome! But it since it uses mpd clients to play music and not it's own, i can't search fields that are not allowed by MPC. So i can't do mpc searchadd lyrics "bathroom window" and pull up the Beatles track. 

Thank you too Peter! Looking at Peter's suggestion, i'm trying to use that play command setting, but i'm getting "  WARNING  Stopping actor due to decode problem, data supplied by client was not valid UTF-8" That seems to be coming from network.py which is from mopidy itself. I'll keep digging, but thanks for starting the hole, you two!

... or something like that ...

Samuel Loury

unread,
Jan 27, 2016, 3:51:43 PM1/27/16
to Bearcat Şándor, beets
Bearcat Şándor <bearca...@gmail.com> writes:

[...]

> since it uses mpd clients to play music and not it's own, i can't
> search fields that are not allowed by MPC. So i can't do mpc searchadd
> lyrics "bathroom window" and pull up the Beatles track.
>
> Thank you too Peter! Looking at Peter's suggestion, i'm trying to use that
> play command setting, but i'm getting " WARNING Stopping actor due to
> decode problem, data supplied by client was not valid UTF-8" That seems to
> be coming from network.py which is from mopidy itself. I'll keep digging,
> but thanks for starting the hole, you two!

If the beet database is available in the local computer, what would you
need mpd for ? Couldn't you just use beet play ?

AFAICU, mpd is useful when you want to play music on a remote headless
computer.

In such a case, you could also try :
1. one of the mopidy web interface¹, most of them allow beet query
2. the mopidy json rpc API or beet web API to create a simple search
query. For instance, you could simply issue a command to find the ids.
And then construct the play list from that:
--8<---------------cut here---------------start------------->8---
curl http://127.0.0.1:8337/item/query/lyrics%3Abathroom%20window|json_pp|gi '"id"'|sed -r 's|^.+: (.+),$|\1|'|while read id
do
mpc add "beets:track;${id}"
done
--8<---------------cut here---------------end--------------->8---
The code is ugly, but it highlights the possibility.

I am starting to use beets+mopidy, so I am also looking for all the
possibilities. It looks like they allow a quite huge level of hackability
without a lot of effort.

Hope that helps,

¹ https://docs.mopidy.com/en/latest/ext/web
signature.asc
Reply all
Reply to author
Forward
0 new messages