Short question:
Is there some 'official' way to start playing a playlist from a command line?
Long question (actually the same):
I think I am not very familiar with whole moc functionalities, so I am not sure if this message is a question-on-usage, a feature request or a patch. So, please let me take a little of your time to explain my needs.
My needs are somehow specific. I need the following command-line player features:
1. start playing a file;
2. start playing files from an m3u;
3. next/prev/stop/pause/resume (when playing m3u);
4. tell what is playing now.
The player must not require X, and desirably should play as a background server. Also, player should not be limited to playing mp3 only.
This is required to provide IR-controlled music, somewhat like a radio-station with feedback. I use LIRC and my own perl script.
So, after some searches, I recognized that MOC fits my purposes best. I took moc, it was 2.3.3.
To play file, I used `mocp -l filename.mp3`. But I couldn't find how can I start an m3u file. So, I applies a little patch to moc:
--- begin ---
--- moc-2.3.3/interface.c 2005-12-29 17:06:55.000000000 +0300
+++ moc-2.3.3.my/interface.c 2006-02-05 03:58:53.000000000 +0300
@@ -4295,9 +4295,16 @@
plist_init (&plist);
- for (i = 0; i < arg_num; i++)
+ for (i = 0; i < arg_num; i++) {
if (is_url(args) || is_sound_file(args))
plist_add (&plist, args);
+ if (is_plist_file(args)) {
+ struct plist tmp;
+ plist_init(&tmp);
+ plist_load(&tmp, args, NULL);
+ plist_cat(&plist, &tmp);
+ }
+ }
if (plist_count(&plist)) {
int serial;
--- end ---
After that, I could start m3u's with `moc -l playlist.m3u`
Thank you for reading so much :) My questions are:
1. Is there some 'official' way to start playing a playlist?
2. If no, would that feature fit well with mainstream MOC ideas?