changeset 636:aa6914ee37ab trunk

[svn] id3v1 tag stuffs.
author nenolod
date Thu, 16 Feb 2006 07:40:35 -0800
parents 6a9e1af8ee75
children 2b06eb5e472d
files Plugins/Input/mpg123/mpg123.c
diffstat 1 files changed, 22 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)