# HG changeset patch # User nenolod # Date 1140104435 28800 # Node ID aa6914ee37ab7a0a2a32bbcc812849872c2e22bb # Parent 6a9e1af8ee752e09d7abf1df684f10ab05ab0368 [svn] id3v1 tag stuffs. diff -r 6a9e1af8ee75 -r aa6914ee37ab Plugins/Input/mpg123/mpg123.c --- a/Plugins/Input/mpg123/mpg123.c Sun Feb 12 11:10:41 2006 -0800 +++ b/Plugins/Input/mpg123/mpg123.c Thu Feb 16 07:40:35 2006 -0800 @@ -371,9 +371,24 @@ if (!strncasecmp(filename, "http://", 7)) { return mpg123_detect_by_content_stream(filename); } - else +#ifdef NOTYET + else if (! return (mpg123_detect_by_content(filename)); - +#endif + else + { + gchar *ext = strrchr(filename, '.'); + if (ext) { + if (!strncasecmp(ext, ".ogg", 4)) + return FALSE; + if (!strncasecmp(ext, ".rm", 3) || + !strncasecmp(ext, ".ra", 3) || + !strncasecmp(ext, ".rpm", 4) || + !strncasecmp(ext, ".ram", 4)) + return FALSE; + } + return TRUE; + } return FALSE; } @@ -472,7 +487,11 @@ g_strstrip(v2->album); g_strstrip(v2->comment); g_strstrip(v2->genre); - v2->year = atoi(v1->year); + { + char y[5]; + memcpy(y, v1->year, 4); y[4]=0; + v2->year = atoi(y); + } /* Check for v1.1 tags. */ if (v1->u.v1_1.__zero == 0)