changeset 1403:d7a0b7f3b8c0

- Branch merge
author Ralf Ertzinger <ralf@skytale.net>
date Sat, 04 Aug 2007 18:51:04 +0200
parents ce121ac96279 (current diff) fe0a9cf95642 (diff)
children ab7d89bb8fcb
files
diffstat 4 files changed, 27 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/madplug/plugin.c	Sat Aug 04 18:50:33 2007 +0200
+++ b/src/madplug/plugin.c	Sat Aug 04 18:51:04 2007 +0200
@@ -837,6 +837,6 @@
 
 InputPlugin *madplug_iplist[] = { &mad_ip, NULL };
 
-DECLARE_PLUGIN(madplug, NULL, NULL, madplug_iplist, NULL, NULL, NULL, NULL, NULL);
+SIMPLE_INPUT_PLUGIN(madplug, madplug_iplist);
 
 InputPlugin *mad_plugin = &mad_ip;
--- a/src/pls/pls.c	Sat Aug 04 18:50:33 2007 +0200
+++ b/src/pls/pls.c	Sat Aug 04 18:51:04 2007 +0200
@@ -66,24 +66,31 @@
         g_snprintf(line_key, sizeof(line_key), "File%d", i);
         if ((line = read_ini_string(inifile, "playlist", line_key)))
         {
+            gchar *uri = g_filename_to_uri(line, NULL, NULL);
+
+            if (uri)
+                g_free(line);
+            else
+                uri = line;
+
             if (cfg.use_pl_metadata)
             {
                 g_snprintf(title_key, sizeof(title_key), "Title%d", i);
 
                 if ((title = read_ini_string(inifile, "playlist", title_key)))
-                    playlist_load_ins_file(playlist, line, filename, pos, title, -1);
+                    playlist_load_ins_file(playlist, uri, filename, pos, title, -1);
                 else
-                    playlist_load_ins_file(playlist, line, filename, pos, NULL, -1);
+                    playlist_load_ins_file(playlist, uri, filename, pos, NULL, -1);
             }
             else
-                playlist_load_ins_file(playlist, line, filename, pos, NULL, -1);
+                playlist_load_ins_file(playlist, uri, filename, pos, NULL, -1);
 
-                added_count++;
+            added_count++;
 
-                if (pos >= 0)
-                    pos++;
+            if (pos >= 0)
+                pos++;
 
-                g_free(line);
+            g_free(uri);
         }
     }
 
@@ -107,9 +114,17 @@
 
     for (node = playlist->entries; node; node = g_list_next(node)) {
         PlaylistEntry *entry = PLAYLIST_ENTRY(node->data);
+        gchar *fn;
+
+        if (vfs_is_remote(entry->filename))
+            fn = g_strdup(entry->filename);
+        else
+            fn = g_filename_from_uri(entry->filename, NULL, NULL);
 
         vfs_fprintf(file, "File%d=%s\n", g_list_position(playlist->entries, node) + 1,
-                    entry->filename);
+                    fn);
+
+        g_free(fn);
     }
 
     PLAYLIST_UNLOCK(playlist->mutex);
--- a/src/sid/xmms-sid.c	Sat Aug 04 18:50:33 2007 +0200
+++ b/src/sid/xmms-sid.c	Sat Aug 04 18:51:04 2007 +0200
@@ -536,7 +536,6 @@
 
 	/* Exit the playing thread */
 	XSDEBUG("exiting thread, bye.\n");
-	XS_THREAD_EXIT(NULL);
 }
 
 
@@ -572,19 +571,10 @@
 	xs_status.currSong = xs_status.tuneInfo->startTune;
 
 	/* Start the playing thread! */
-	xs_decode_thread = g_thread_create((GThreadFunc) xs_playthread, pb, TRUE, NULL);
-	if (xs_decode_thread == NULL) {
-		xs_error(_("Couldn't create playing thread!\n"));
-		xs_tuneinfo_free(xs_status.tuneInfo);
-		xs_status.tuneInfo = NULL;
-		xs_status.sidPlayer->plrDeleteSID(&xs_status);
-	}
+	xs_decode_thread = g_thread_self();
+	xs_playthread(pb);
 
-	/* Okay, here the playing thread has started up and we
-	 * return from here to XMMS. Rest is up to XMMS's GUI
-	 * and playing thread.
-	 */
-	XSDEBUG("systems should be up?\n");
+	XSDEBUG("playback is done\n");
 }
 
 
--- a/src/wma/libffwma/file.c	Sat Aug 04 18:50:33 2007 +0200
+++ b/src/wma/libffwma/file.c	Sat Aug 04 18:51:04 2007 +0200
@@ -30,8 +30,6 @@
 {
     VFSFile *file;
 
-    strstart(filename, "file:", &filename);
-
     if (flags & URL_WRONLY) {
 	file = vfs_fopen(filename, "wb");
     } else {