Playlist, a suggestion

Mopidy expects its playlist entries to start with local:track:/ or file://.
This makes a mopidy playlist incompatible with any other player.
I would like to suggest, that mopidy before giving up on an entry in a playlist as not playable, tries to access the entry with file:// and failing that with local:track:/.
This would allow a m3u playlist generated by another program to be used/shared by mopidy.
The beet smartplaylist plugin would be an interesting candidate to create playlists for use in mopidy.

Would this be a possible path?

And of course Thanks a lot for this great piece of software.

Cheers
tom

This works just fine with the beets smartplaylist plugin - I’ve just done it. Are you correctly setting the beets ‘relative_to’ option and have you scanned this directory with Mopidy?

While this works with the beets smart playlist plugin by setting the relative_to option, the result is a playlist, that only mopidy can play.
I would like to have a m3u file playable and editable by different player.
AFAIK a ‘/’ at the beginning of a URI is only useful for describing a file path.
Thus it could be interpreted as file:// and a m3u file with absolut path could be played without breaking the other playback extensions.

That beets plugin is specifically described as for use with MPD’s playlist functionality so it is seems altogether quite reasonable what it generates. If you wanted to transform the plugin’s output into the more generic file:// scheme then you could very easily do that.

However, saying all that, have you tried what you are suggesting? Again, it works for me: http://dpaste.com/18SR5D8. Am I missing something?

[local]
enabled = true
library = json
media_dir = /tmp
data_dir = /var/lib/mopidy/local
playlists_dir = /var/lib/mopidy/playlists

Note I set media_dir = /tmp just to make it clear that the playlist entries really are just absolute paths on my filesystem and completely outside of my normal local media.

I definetly should do more testing before posting.
So Mopidy behaves already as i suggested. I am impressed.
Thanks for your patience.

Hi,
@kingosticks it would be very helpful (to me) if you could provide a little bit more information on how to install and configure the beet smartlist plugin in mopidy.
I am quite a newbie of mopidy (via pimusicbox) and I know almost nothing about beets.
thank you!

I'm afraid I don't use it. I just installed beets and the beets plugin and gave it a quick test drive to see what it could do. The beets documentation was what I used and it seemed pretty good. Sorry I'm not sure I can be much help.

I see… but how to you get mopidy and beets to interact with each other?
a google search for “mopidy beets” doesn’t help much. the first result is about mopidy-beets plugin which I understand you did not use. beets documentation is not very useful to me (I hardly get what is it doing).
The motivation of my interest in this business is mainly linked with the fact that I would like mopidy to read mpd format playlists placed in /var/lib/mopidy/playlists.
I am modifying a rasperry pi internet radio code that is based on mpd and I would like to use it with mopidy.
maybe I am taking the wrong path to solve the problem and there is an simpler solution.
what do you think?

Beets is a music media organizer. It scans a folder, (optionally) autotagges the files and (optionally) copies or moves them in to a nice customizable directory structure. It uses a sqlite database to store its information and can then be queried for specific songs. Also it allows for custom attributes, so you could for example define moods your songs represent. (Helpful to avoid those Death Metal Songs on auto generated sunday morning playlists)
Beets makes it incredibly easy to write plugins that extend its functionality. One of this plugins is the playlist plugin which writes playlists based on rules you can define.

Interaction between mopidy and beets can be achieved via different means.

  1. You can have beets write some playlists and let mopidy use them.
  2. You can use the mopidy-beets plugin which uses beets web interface.
    Mopidy Clients like rompr provide a search interface where you can select beets as your search repository. Moped then streams the songs from beets web interface.
  3. You can use beets to play your songs via mopidy.
  • You could pipe beets search results to mpc.
  • You can use the beets play plugin.
  • You can write your own plugin.
    ( i just wrote a little autoplay plugin for different moods that takes play count and ratings in to account. It is operated by a ir remote control. Proximity sensor is next)
  1. You could use mopidys extension structure to access beets api. As both programs are written in python you just need to import the beets module to have access to its library.
    This is something i want to look into, as the beets web interface has some limitations.

So the most difficult part is to decide which approach works best. For that decision you need to define very precisly what you want to achieve.

HTH

Great summary, thank you.

Thank you @rawdlite!!
That was a pretty nice summary… so that beets seems (a part from downloading) close in spirit to couchpotato and sickbeard.
anyway…
I think already point 1 of your list is interesting to me.
How to I get mopidy read a playlist, say .pls format?
the obvious

> mpc load my_playlist.pls 

is not quite working for me.
I get

> Error: no such playlist

is this because my playlist is hill formatted or is there something more fundamental?

EDIT: I fall for this every time . Local playlists must be m3u format. pls is not supported.