General discussion

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

native fs encoding option patch

hi all, i wrote patch for optional usage of native filesystem encoding, instead of tries to iconv() names.
moc-2.4.4 stable


diff -Naur moc-2.4.4/config.example moc-2.4.4.new/config.example
--- moc-2.4.4/config.example 2008-04-11 21:54:50.000000000 +0600
+++ moc-2.4.4.new/config.example 2010-06-28 01:05:43.000000000 +0600
@@ -125,6 +125,10 @@
# if UseRCC is set to yes.
#ID3v1TagsEncoding = WINDOWS-1250

+# Do not try to convert filenames and inconvertable tags
+# May bring back national charset, instead of '#'-s
+#NativeFSEncoding = yes
+
# Use librcc to fix ID3 version 1/1.1 tags encoding.
#UseRCC = yes

diff -Naur moc-2.4.4/options.c moc-2.4.4.new/options.c
--- moc-2.4.4/options.c 2007-05-23 00:24:34.000000000 +0600
+++ moc-2.4.4.new/options.c 2010-06-28 00:45:51.000000000 +0600
@@ -217,6 +217,7 @@
option_add_int ("SetXtermTitle", 1);
option_add_int ("PlaylistFullPaths", 1);
option_add_int ("Allow24bitOutput", 0);
+ option_add_int ("NativeFSEncoding", 0);
}

/* Return 1 if a parameter to an integer option is valid. */
@@ -243,6 +244,7 @@
|| !strcasecmp(name, "SetXtermTitle")
|| !strcasecmp(name, "PlaylistFullPaths")
|| !strcasecmp(name, "Allow24bitOutput")
+ || !strcasecmp(name, "NativeFSEncoding")
) {
if (!(val == 1 || val == 0))
return 0;
diff -Naur moc-2.4.4/utf8.c moc-2.4.4.new/utf8.c
--- moc-2.4.4/utf8.c 2007-02-11 17:40:13.000000000 +0500
+++ moc-2.4.4.new/utf8.c 2010-06-28 00:57:47.000000000 +0600
@@ -44,9 +44,11 @@
#include "common.h"
#include "log.h"
#include "utf8.h"
+#include "options.h"

static char *terminal_charset = NULL;
static int using_utf8 = 0;
+static int NativeFSEncoding = 0;

static iconv_t iconv_desc = (iconv_t)(-1);

@@ -63,7 +65,7 @@

if (!str)
return NULL;
- if (desc == (iconv_t)(-1))
+ if (desc == (iconv_t)(-1) || (NativeFSEncoding && str[strlen(str)-1] == '/'))
return xstrdup (str);

str_copy = inbuf = xstrdup (str);
@@ -78,13 +80,16 @@
&outbytesleft)
== (size_t)(-1)) {
if (errno == EILSEQ) {
- inbuf++;
inbytesleft--;
if (!--outbytesleft) {
*outbuf = 0;
break;
}
- *(outbuf++) = '#';
+ if (!NativeFSEncoding)
+ *(outbuf++) = '#';
+ else
+ *(outbuf++) = *inbuf;
+ inbuf++;
}
else if (errno == EINVAL) {
*(outbuf++) = '#';
@@ -320,6 +325,7 @@
if (iconv_desc == (iconv_t)(-1))
logit ("iconv_open() failed: %s", strerror(errno));
}
+ NativeFSEncoding = options_get_int("NativeFSEncoding");
}

void utf8_cleanup ()

Problem with MOC (configs)

I don't have dir for configs, when i try to create and start it I get
"FATAL_ERROR: Parse error at the end of the config file (need end of line?).
"

Symlink handling could be improved

I use a lot of symbolic links in my music collection to navigate between albums, genres etc. This doesn't work with MOC because MOC does not remove loops when resolving a link. For example, I have symlinks between albums and artists organized as follows:

albums/X/artist_Y -> ../../artists/Y
artists/Y/album_X -> ../../album/X

Each time I navigate between the two directories, MOC's "current directory" becomes longer, and at some point MOC crashes.

An simple solution, which works fine for me, is to normalize the directory using realpath() in go_to_dir().

MOC could use a bug tracker..

Not much more to say, other than IMHO fora are quite messy, especially this one, and I doubt it's possible to keep an overview this way.

Restoring Soft Mixer Level

The last 2.4.4 alpha contained settings to restore the soft mixer level. It didn't work, but now it's gone alltogether. It would be nice if those could be restored.

Regression: wavpack support dropped?

Hey.
It seems that between the alpha release and 2.4.4 wavpack support was dropped. It's apparently not mentioned in the changelog. I wonder why this was done.

playback follows cursor

Hello there,
has MOC a function like "playback follows cursor"? Since I can't use foobar anymore MOC is my favorite player but I miss this feature hardly, even in big playlists.

MfG Bean

Play last song in the playlist

I'm doing an aplication to manage playlist song, enqueeing them and playing it.
What I need to do is to add a song and then play it, but that song must be added to the list, so then the random next could work. It is posible to do this??

Sorry for my english. I'm from Argentina

Pages

Subscribe to RSS - General discussion