changeset 4052:b0429a649a84

Handle streams inside m3u files better. If thres a better way than is_http() to detect streams, let me know.
author Christian Birchinger <joker@netswarm.net>
date Sat, 01 Dec 2007 23:38:18 +0100
parents c07a3723777c
children 838ef7dc0cd6
files src/audacious/playlist.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playlist.c	Sat Dec 01 20:51:47 2007 +0100
+++ b/src/audacious/playlist.c	Sat Dec 01 23:38:18 2007 +0100
@@ -1700,7 +1700,14 @@
                        const gchar * playlist_name, gint pos,
                        const gchar * title, gint len)
 {
-    Tuple *tuple = tuple_new();
+    Tuple *tuple;
+
+    if (is_http(filename_p)) {
+      tuple = tuple_new();
+      tuple_associate_string(tuple, FIELD_FILE_NAME, NULL, filename_p);        
+    } else {
+      tuple = tuple_new_from_filename(filename_p);
+    }
 
     tuple_associate_string(tuple, FIELD_TITLE, NULL, title);
     tuple_associate_int(tuple, FIELD_LENGTH, NULL, len);