changeset 1550:be50c53aee09 trunk

[svn] - some minimal integration
author nenolod
date Thu, 10 Aug 2006 18:36:15 -0700
parents 854016a03129
children a4180850edfe
files ChangeLog audacious/playlist.c audacious/playlist_container.c audacious/playlist_container.h
diffstat 4 files changed, 19 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Aug 10 18:24:11 2006 -0700
+++ b/ChangeLog	Thu Aug 10 18:36:15 2006 -0700
@@ -1,3 +1,13 @@
+2006-08-11 01:24:11 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [2012]
+  - more
+  
+
+  Changes:        Modified:
+  +42 -0          trunk/audacious/playlist_container.c  
+  +6 -1           trunk/audacious/playlist_container.h  
+
+
 2006-08-11 01:10:25 +0000  William Pitcock <nenolod@nenolod.net>
   revision [2010]
   - incomplete PlaylistContainer implementation
--- a/audacious/playlist.c	Thu Aug 10 18:24:11 2006 -0700
+++ b/audacious/playlist.c	Thu Aug 10 18:36:15 2006 -0700
@@ -49,6 +49,7 @@
 #include "equalizer.h"
 #include "playback.h"
 #include "playlist.h"
+#include "playlist_container.h"
 #include "ui_playlist.h"
 #include "urldecode.h"
 #include "util.h"
@@ -487,28 +488,6 @@
     playlist_recalc_total_time();
 }
 
-
-PlaylistFormat
-playlist_format_get_from_name(const gchar * filename)
-{
-    int i;
-
-    for (i = 0; i < PLAYLIST_FORMAT_COUNT; i++)
-    {
-        if (str_has_suffix_nocase(filename, playlist_format_suffixes[i]))
-            return i;
-    }
-
-    return PLAYLIST_FORMAT_UNKNOWN;
-}
-
-gboolean
-is_playlist_name(const gchar * filename)
-{
-    g_return_val_if_fail(filename != NULL, FALSE);
-    return playlist_format_get_from_name(filename) != PLAYLIST_FORMAT_UNKNOWN;
-}
-
 gboolean
 playlist_ins(const gchar * filename, gint pos)
 {
@@ -1375,7 +1354,6 @@
     return ret;
 }
 
-
 static void
 playlist_load_ins_file(const gchar * filename_p,
                        const gchar * playlist_name, gint pos,
--- a/audacious/playlist_container.c	Thu Aug 10 18:24:11 2006 -0700
+++ b/audacious/playlist_container.c	Thu Aug 10 18:36:15 2006 -0700
@@ -56,20 +56,18 @@
 	return NULL;
 }
 
-GList *playlist_container_read(char *filename, GList *list)
+void playlist_container_read(char *filename, gint pos)
 {
 	char *ext = strrchr(filename, '.') + 1;		/* optimization: skip past the dot -nenolod */
 	PlaylistContainer *plc = playlist_container_find(ext);
 
 	if (plc->plc_read == NULL)
-		return list;
+		return;
 
-	list = plc->plc_read(filename, list);
-
-	return list;
+	list = plc->plc_read(filename, pos);
 }
 
-void playlist_container_write(char *filename, GList *list)
+void playlist_container_write(char *filename, gint pos)
 {
 	char *ext = strrchr(filename, '.') + 1;		/* optimization: skip past the dot -nenolod */
 	PlaylistContainer *plc = playlist_container_find(ext);
@@ -77,5 +75,6 @@
 	if (plc->plc_write == NULL)
 		return;
 
-	plc->plc_write(filename, list);
+	plc->plc_write(filename, pos);
 }
+
--- a/audacious/playlist_container.h	Thu Aug 10 18:24:11 2006 -0700
+++ b/audacious/playlist_container.h	Thu Aug 10 18:36:15 2006 -0700
@@ -34,8 +34,8 @@
 
 extern void playlist_container_register(PlaylistContainer *plc);
 extern void playlist_container_unregister(PlaylistContainer *plc);
-extern GList *playlist_container_read(char *filename, GList *list);
-extern void playlist_container_write(char *filename, GList *list);
+extern void playlist_container_read(char *filename, gint pos);
+extern void playlist_container_write(char *filename, gint pos);
 
 
 #endif