Directly trigger playback of MP3 folder from command line?

Hi all,

I would like to start playing back a folder of MP3s from command line. How can this be done?

With Spotify I have figured out a way to easily playback an album just by ID on the CLI:

$ mpc clear
$ mpc add spotify:album:58L7WTGGQoYoaTPJEDsB3E
$ mpc play

I enabled [file] and tried adding MP3 files and directories with mpc with absolute and relative path, but that didn’t work.

How can I do this with a folder of MP3s, like “mpc add music/U2/Songs_of_Innocence/”, preferably without any pre-processing like creating playlists or triggering scanning?

Thanks
bluepuma

Take a look at what you’ve got:

$ mpc ls Files
Files/Music
$ mpc ls Files/Music
Files/Music/A Perfect Circle - Mer de Noms
Files/Music/And So I Watch You From Afar - Gangs
Files/Music/And So I Watch You From Afar - Self Titled (2009)

Add something (can be an entire directory like I’m doing, or a single file):

$ mpc add "Files/Music/A Perfect Circle - Mer de Noms"

Profit:

$ mpc play

Thanks, works perfectly. I didn’t know about “mpc ls” and now just add the “Files” prefix.

You can also do mpc help to see all the other available commands. It’s quite powerful.