changeset 3143:34b4b7c9bcd4 trunk

made the decoder chooser aware of lastfm MP3 streams so that it will only try mad
author Cristi Magherusan <majeru@atheme-project.org>
date Sun, 22 Jul 2007 14:03:17 +0300
parents e8f2b130e59e
children 2812140dba3f
files src/audacious/input.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/input.c	Sun Jul 22 12:12:08 2007 +0900
+++ b/src/audacious/input.c	Sun Jul 22 14:03:17 2007 +0300
@@ -364,11 +364,12 @@
     filename_proxy = g_strdup(filename);
 
     /* Some URIs will end in ?<subsong> to determine the subsong requested. */
+    /* other streams (like lastfm's) end in  ?Session=<session>*/
     tmp_uri = g_strdup(filename);
 
     tmp = strrchr(tmp_uri, '?');
 
-    if (tmp != NULL && g_ascii_isdigit(*(tmp + 1)))
+    if (tmp != NULL && (g_ascii_isdigit(*(tmp + 1))|| !g_strncasecmp(tmp+1,"Session=",8)))
         *tmp = '\0';
 
     fd = vfs_buffered_file_new_from_uri(tmp_uri);