General discussion

Here you can discuss everything related to MOC which doesn't fit other subforum.

Going to the next song in the ncurses interface: A thought experiment.

Right, so I have no bloody idea how to skip to the next song in the MoC client. Stupid, I know, right? I do know that it's none of the obvious choices: Right, Up, Shift + either of the preceding, Ctrl + either of the preceding or Alt + either of the preceding. It is also not Shift + N or Ctrl + N. It is N, which was the ninth or so thing I tried. I'm okay with that. I wouldn't have guessed it at first, though. I can imagine someone not immediately guessing it. Right? I can imagine someone getting frustrated, too.

But, I mean, it's not in the man page. It's not in the online README under Documentation, either. It's not even in the -info- page, which I resort to only when I'm desperate. So I'm curious:

Without guessing, and without bothering someone on IRC, what rational sequence of actions would a user take to find out what key goes to the next song? Looking in the man page won't work, looking in the online documentation (all of it, even!) won't work, so... what's a rational person to do? I mean, assuming someone will be able to guess your keybindings is not often considered a great approach to user interfaces.

Other than that, nice job, devs, it works great.

Playing a growing file

Is there a way I can ask mocp to continue playing a wave file which is being appended with new data even after its apparent length (the length it had when playing began) is reached?

fatal error while decoding mp4a

Scenario: FreeBSD 8.0 stable, freshly compiled and installed ffmpeg et al.
Playing the same file using ffplay works, so no corrupt data (I hope). Playing mp3 works, so no .

mocp 2.4.4 crashes as soon as the file is selected for playback.

Any advice on further debugging?

Thanks :)

last entries in server log are

Feb 14 18:36:33.307636: server.c:436 send_events(): Flushing events for client 0
Feb 14 18:36:33.307683: player.c:451 decode_loop(): loop...
Feb 14 18:36:33.307792: ffmpeg.c:267 ffmpeg_decode(): Got 7B packet

client crashes
Feb 14 18:36:33.293403: interface.c:3196 dequeue_events(): Dequeuing events...
Feb 14 18:36:33.293481: interface.c:3203 dequeue_events(): done
Feb 14 18:36:33.307896: interface.c:951 server_event(): EVENT: 0x01
Feb 14 18:36:33.308194: common.c:55 fatal(): FATAL ERROR: Can't receive value from the server.
Feb 14 18:36:33.310732: main.c:124 sig_chld(): Got SIGCHLD

moc cannot read remote smb directory

Scenario:
% smbmount //SERVERIP/share mnt/smb:share -ousername=XXX
% stat mnt/smb:share/data0
File: „mnt/smb:share/data0“
Size: 0 Blocks: 0 IO Block: 16384 Verzeichnis
Device: 16h/22d Inode: 279293133324290 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 1000/ XXX) Gid: ( 1000/ XXX)
Access: 2010-02-13 XX:52:31.000000000 +0100
Modify: 2010-02-12 XX:01:39.000000000 +0100
Change: 2010-02-12 XX:01:39.000000000 +0100

=> running mocp -S -D -F
No error logging

=> running the moc client says:
(1!) Can't stat mnt/smb:share: Der Wert ist zu groß für den definierten Datentyp
in the message window

Observation:
The mounted Directory doesnt appear in the moc-client Directory Browser. If i start moc with mocp mnt/smb:share/any_subdirectory thers no error but i cannot see any files (except .., that works).

mounting mit noserverino
% smbmount //SErVERIP/share mnt/smb:share -ousername=XXX,noserverino
% stat mnt/smb:share/data0
File: „mnt/smb:share/data0“
Size: 0 Blocks: 0 IO Block: 16384 Verzeichnis
Device: 16h/22d Inode: 20234 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 1000/ XXX) Gid: ( 1000/ XXX)
Access: 2010-02-13 22:XX:31.000000000 +0100
Modify: 2010-02-12 19:XX:39.000000000 +0100
Change: 2010-02-12 19:XX:39.000000000 +0100

observation
Everything works as expected

Additional Information:
Server: Linux XXX 2.6.30-1-amd64 #1 SMP Sat Aug 15 18:09:19 UTC 2009 x86_64 GNU/Linux
Samba Server: smbd -V: Version 3.4.5
Client: Linux XXX 2.6.32-trunk-686 #1 SMP Sun Jan 10 06:32:16 UTC 2010 i686 GNU/Linux

Simple database feature

Is it possible to link a simple database to mocp?
I would like to search in my collection by author, title, performer and then to have this and some additional information displayed during reproduction.
I would like not to use Id3 tags or other tagging methods but to use a separate database file.
Thanks for your help.
Antonio

patch for xterm detection

Hello, I've added some more comparisions of the TERM environment variable to detect xterms and rxvt terminals.

Index: moc-2.4.4/interface_elements.c
===================================================================
--- moc-2.4.4.orig/interface_elements.c 2008-06-29 02:56:13.000000000 -0700
+++ moc-2.4.4/interface_elements.c 2010-02-02 10:26:45.000000000 -0800
@@ -2114,8 +2114,10 @@
char *term;

if ((((term = getenv("TERM")) && !strcmp(term, "xterm"))
- || !strcmp(term, "rxvt")
|| !strcmp(term, "xterm-color")
+ || !strcmp(term, "xterm-xfree86")
+ || !strcmp(term, "rxvt")
+ || !strcmp(term, "rxvt-color")
|| !strcmp(term, "rxvt-unicode")
|| !strcmp(term, "eterm")
|| !strcmp(term, "Eterm")))

Restore playlist after detaching

I was wondering if it was possible to restore the current playlist after detaching MOC and reattaching it back. More accurately, is it possible to get the list on the right pane back (since the music is on, anyway)?

I'm using 2.5.0-alpha4 on Arch Linux.

recursive_delete, fix_make_dist patches

I haven't been using moc long, but wanted to delete music from the current play list by directory, so here is a patch that does that. Usefulness probably depends on the layout of your music directories.
diff -r 75d635531903 interface.c
--- a/interface.c Mon Jan 25 07:29:36 2010 +1100
+++ b/interface.c Wed Jan 27 03:57:16 2010 +1100
@@ -2579,20 +2579,78 @@
static void delete_item ()
{
char *file;
-
- if (!iface_in_plist_menu()) {
- error ("You can only delete an item from the "
- "playlist.");
+ enum file_type type;
+
+ if (!playlist->not_deleted)
+ return; // don't even bother
+
+ file = iface_get_curr_file ();
+ if (!file)
return;
+
+ type = iface_curritem_get_type ();
+
+ if (iface_in_dir_menu()) {
+ if (type != F_SOUND && type != F_DIR && type != F_PLAYLIST) {
+ error ("Don't know how to delete selected item.");
+ free (file);
+ return;
+ }
+
+ if (!strcmp (file, "..")) {
+ error ("Can't delete '..'.");
+ free (file);
+ return;
+ }
+
+ if (type == F_SOUND) {
+ if(plist_find_fname (playlist, file) == -1) {
+ error ("File not in playlist.");
+ free (file);
+ return;
+ }
+
+ iface_menu_key (KEY_CMD_MENU_DOWN);
+ }
}
-
- assert (plist_count(playlist) > 0);
-
- file = iface_get_curr_file ();
-
- send_int_to_srv (CMD_LOCK);
- remove_file_from_playlist (file);
- send_int_to_srv (CMD_UNLOCK);
+ else
+ assert (plist_count (playlist) > 0);
+
+ if (type == F_DIR || type == F_PLAYLIST) {
+ struct plist plist;
+ int i;
+
+ iface_set_status ("Reading directories...");
+ plist_init (&plist);
+
+ if (type == F_DIR) {
+ read_directory_recurr (file, &plist);
+ plist_sort_fname (&plist);
+ }
+ else
+ plist_load (&plist, file, cwd, 0);
+
+ if(plist.num)
+ {
+ send_int_to_srv (CMD_LOCK);
+ for (i = 0; i < plist.num; ++i)
+ if(plist_find_fname (playlist, plist.items.file) != -1)
+ remove_file_from_playlist (plist.items.file);
+ send_int_to_srv (CMD_UNLOCK);
+ }
+ else
+ {
+ error ("No items to delete");
+ }
+ iface_set_status ("");
+
+ plist_free (&plist);
+ }
+ else {
+ send_int_to_srv (CMD_LOCK);
+ remove_file_from_playlist (file);
+ send_int_to_srv (CMD_UNLOCK);
+ }

free (file);
}

I also found that "make dist" produces incomplete tarballs if ./configure decides things are missing from the host. (As I am not at all familiar with autotools/automake and just read http://www.gnu.org/software/libtool/manual/automake/Unconfigured-Subdirectories.html there may be a better solution to this.)
diff -r c34b35d22d89 decoder_plugins/Makefile.am
--- a/decoder_plugins/Makefile.am Mon Feb 01 02:28:14 2010 +1100
+++ b/decoder_plugins/Makefile.am Mon Feb 01 08:02:07 2010 +1100
@@ -1,1 +1,2 @@
SUBDIRS = @DECODER_PLUGINS@
+DIST_SUBDIRS = aac flac modplug musepack sndfile timidity wavpack ffmpeg mp3 sidplay2 speex vorbis

Pages

Subscribe to RSS - General discussion