rpms/rhythmbox/devel rhythmbox-0.11.2-add-podcast-test.patch, NONE, 1.1 rhythmbox.spec, 1.141, 1.142

Bastien Nocera (hadess) fedora-extras-commits at redhat.com
Fri Nov 9 12:50:47 UTC 2007


Author: hadess

Update of /cvs/pkgs/rpms/rhythmbox/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6286

Modified Files:
	rhythmbox.spec 
Added Files:
	rhythmbox-0.11.2-add-podcast-test.patch 
Log Message:
Add the podcast test parser for the benefit of the new playlist parser use


rhythmbox-0.11.2-add-podcast-test.patch:

--- NEW FILE rhythmbox-0.11.2-add-podcast-test.patch ---
Index: podcast/test-podcast-parse.c
===================================================================
--- podcast/test-podcast-parse.c	(revision 0)
+++ podcast/test-podcast-parse.c	(revision 5323)
@@ -0,0 +1,91 @@
+
+#include "config.h"
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#include <libgnomevfs/gnome-vfs.h>
+
+#include "rb-podcast-parse.h"
+
+#include <string.h>
+
+static gboolean debug = FALSE;
+
+void rb_debug_real (const char *func,
+		    const char *file,
+		    int line,
+		    gboolean newline,
+		    const char *format, ...) G_GNUC_PRINTF (5, 6);
+
+/* For the benefit of the podcast parsing code */
+void
+rb_debug_real (const char *func,
+	       const char *file,
+	       int line,
+	       gboolean newline,
+	       const char *format, ...)
+{
+	va_list args;
+	char buffer[1025];
+
+	if (debug == FALSE)
+		return;
+
+	va_start (args, format);
+	g_vsnprintf (buffer, 1024, format, args);
+	va_end (args);
+
+	g_printerr (newline ? "%s:%d [%s] %s\n" : "%s:%d [%s] %s",
+		    file, line, func, buffer);
+}
+
+int main (int argc, char **argv)
+{
+	RBPodcastChannel *data;
+	GList *l;
+	GDate date = {0,};
+	char datebuf[1024];
+
+	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+
+	gnome_vfs_init ();
+
+	if (argv[2] != NULL && strcmp (argv[2], "--debug") == 0) {
+		debug = TRUE;
+	}
+
+	data = g_new0 (RBPodcastChannel, 1);
+	if (rb_podcast_parse_load_feed (data, argv[1]) == FALSE) {
+		g_warning ("Couldn't parse %s", argv[1]);
+		return 1;
+	}
+
+	g_date_set_time_t (&date, data->pub_date);
+	g_date_strftime (datebuf, 1024, "%F %T", &date);
+
+	g_print ("Podcast title: %s\n", data->title);
+	g_print ("Summary: %s\n", data->summary);
+	g_print ("Description: %s\n", data->description);
+	g_print ("Author: %s\n", data->author);
+	g_print ("Date: %s\n", datebuf);
+	g_print ("\n");
+
+	for (l = data->posts; l != NULL; l = l->next) {
+		RBPodcastItem *item = l->data;
+
+		g_date_set_time_t (&date, item->pub_date);
+		g_date_strftime (datebuf, 1024, "%F %T", &date);
+
+		g_print ("\tItem title: %s\n", item->title);
+		g_print ("\tURL: %s\n", item->url);
+		g_print ("\tAuthor: %s\n", item->author);
+		g_print ("\tDate: %s\n", datebuf);
+		g_print ("\tDescription: %s\n", item->description);
+		g_print ("\n");
+	}
+
+	return 0;
+}
+
Index: podcast/Makefile.am
===================================================================
--- podcast/Makefile.am	(revision 5322)
+++ podcast/Makefile.am	(revision 5323)
@@ -1,7 +1,11 @@
 ## arch-tag: Automake rules for podcast library
 
-noinst_LTLIBRARIES = librbpodcast.la
+noinst_LTLIBRARIES = librbpodcast.la librbpodcast_parse.la
 
+librbpodcast_parse_la_SOURCES = 			\
+	rb-podcast-parse.c				\
+	rb-podcast-parse.h
+
 librbpodcast_la_SOURCES =				\
 	rb-feed-podcast-properties-dialog.c		\
 	rb-feed-podcast-properties-dialog.h		\
@@ -11,7 +15,15 @@
 	rb-podcast-parse.h				\
 	rb-podcast-manager.c				\
 	rb-podcast-manager.h
+librbpodcast_la_LIBADD =				\
+	librbpodcast_parse.la
 
+noinst_PROGRAMS = test-podcast-parse
+test_podcast_parse_SOURCES =				\
+	test-podcast-parse.c
+test_podcast_parse_LDADD =				\
+	librbpodcast_parse.la				\
+	$(RHYTHMBOX_LIBS)
 
 INCLUDES =						\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \
Index: podcast/rb-podcast-parse.h
===================================================================
--- podcast/rb-podcast-parse.h	(revision 5322)
+++ podcast/rb-podcast-parse.h	(revision 5323)
@@ -23,6 +23,8 @@
 #define RB_PODCAST_PARSE_H
 
 #include <glib.h>
+#include <libxml/xmlstring.h>
+#include <inttypes.h>
 
 typedef struct
 {


Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/devel/rhythmbox.spec,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- rhythmbox.spec	31 Oct 2007 11:56:19 -0000	1.141
+++ rhythmbox.spec	9 Nov 2007 12:50:05 -0000	1.142
@@ -57,7 +57,8 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=346434
 Patch6: rb-delete-ipod-tracks.patch
 # http://bugzilla.gnome.org/show_bug.cgi?id=484768
-Patch7: rb-use-newer-plparser-7.patch
+Patch7: rhythmbox-0.11.2-add-podcast-test.patch
+Patch8: rb-use-newer-plparser-7.patch
 
 %description
 Rhythmbox is an integrated music management application based on the powerful
@@ -101,7 +102,8 @@
 pushd plugins/ipod/
 %patch6 -p0 -b .ipod-trash
 popd
-%patch7 -p0 -b .podcast
+%patch7 -p0 -b .podcast-test
+%patch8 -p0 -b .podcast
 
 %build
 




More information about the fedora-extras-commits mailing list