General discussion

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

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

M4A with Apple Loseless (alac) - tags confused

Hi!

I have some m4a files with alac data with plenty of tags. However MOC displays contents of tag "composer" instead of "artist" in its playlist. I am using svn version of moc.

Also - I had to disable/delete AAC plugin in order to get ALAC to play by ffmpeg. Maybe with recent versions of ffmpeg, ffmpeg plugin should be prefered over aac?

FATAL_ERROR

i have installed minimal ubuntu 9.10 on my desktop.

When i run "mocp" from terminal and go to a directory i get this error:

FATAL_ERROR: Can't receive value from the Server

But when i do "sudo mocp". It allows me to play songs perfectly.

Anyone know what this error is?

Thank you advanced.

Sorting the playlist

I started using this player recently and I must say I'm impressed, it's very good, even for someone like me that never used a console based player regularly. I just wanted to know if it's possible to sort the playlist, it would be very useful, as I added a lot of files from various folders and they didn't sort automatically.

moc-stable/unstable in Fedora 12

Hello everybody!

At the moment, I am trying to build a moc-rpm in Fedora 12, but I have some problems as I see related to the ffmpeg/ffmpeg-devel-packages in Fedora.
It has been possible to build the rpms without ffmpeg-Support, but this is not what I want.

ffmpeg-Output:
FFmpeg version SVN-r20372, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Nov 7 2009 17:50:32 with gcc 4.4.2 20091027 (Red Hat 4.4.2-7)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib --mandir=/usr/share/man --arch=i686 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --extra-version=rpmfusion --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib --cpu=i686 --enable-runtime-cpudetect
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 1 / 52.37. 1
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1. 4. 1 / 1. 4. 1
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0

I asked an Ubuntu-Karmic-User to build it and he had no problems.
His ffmpeg:
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 13 2009 22:15:16, gcc: 4.4.1

I am not a programmer, so I think, I am not able to change anything in src/moc-2.4.4/decoder_plugins/ffmpeg/ffmpeg.c, but I guess, it is just an include-Problem (wrong path?).

I would like to help having moc in the official rpmfusion-repos, because it is my favourite musicplayer and I do not want other users to have to compile it on their own.

This is my first time building a package and not just compiling something just for me, and I think, I cannot handle this without help.

If my English is a little bad, please apologize. I am no native English speaker.

Thanks for help

sash_

mocp caching support.

Whenever I start mocp (along with the server) it caches all the names (also id3 tags?) of the files in the folder. When I do ^Q it loses the cache and I have to recache everything. This would be ok, but one of my folders is huge, and takes a considerable amount of time to process. Is there a way I can store the cache of the current folder on exit? (my hdd would especially appreciate it :p)

midi files

is it possible to implement a suitable midilib to play midi files
Ive tried timidity and it doesnt work at all

I use ubuntu and there must be some midilib out there that
can work with mocp for this purpose

right now i use gnu's wildmidi
at least it works !

Pages

Subscribe to RSS - General discussion