Bug#677233: proto-patches

2013-05-26 Thread Sebastian Ramacher
Hi Jon,

On 2012-06-26 23:45:50, Jon Dowland wrote:
 
 I was hoping to have this patch finished today and beg for an upload prior to
 the freeze, but 3-5 is not a straightforward substitution ☹ 
 
 Attached are two patches: a straightforward substitution and the beginnings of
 fixing up the bits that need fixing.  I still hope to have this ready for
 squeeze.

thanks for your work on porting gnome-mplayer to the new libmusicbrainz
API. Did you have time to finish up the remaining parts?

Regards
-- 
Sebastian Ramacher


signature.asc
Description: Digital signature


Bug#677233: proto-patches

2012-06-26 Thread Jon Dowland

I was hoping to have this patch finished today and beg for an upload prior to
the freeze, but 3-5 is not a straightforward substitution ☹ 

Attached are two patches: a straightforward substitution and the beginnings of
fixing up the bits that need fixing.  I still hope to have this ready for
squeeze.

(don't mind the NMU stuff in these patches, that's just from my working copy)
Description: Use libmusicbrainz5 instead of 3
Author: Jon Dowland j...@debian.org

--- a/configure.in	(revision 2279)
+++ b/configure.in	(working copy)
@@ -224,13 +224,13 @@
 AC_SUBST(GPOD_CFLAGS)
 AC_SUBST(GPOD_LIBS)
 
-AC_ARG_WITH([libmusicbrainz3],
-[AS_HELP_STRING([--with-libmusicbrainz3],
-[Add support for libmusicbrainz3])],
+AC_ARG_WITH([libmusicbrainz5],
+[AS_HELP_STRING([--with-libmusicbrainz5],
+[Add support for libmusicbrainz5])],
 [],
-[with_libmusicbrainz3=check])
-AS_IF([test x$with_libmusicbrainz3 != xno], 
-[PKG_CHECK_MODULES(MUSICBRAINZ,[libmusicbrainz3 libcurl],[MUSICBRAINZ_DEFINES=-DHAVE_MUSICBRAINZ AC_DEFINE([MUSICBRAINZ_ENABLED],[1],[Define to 1 if you have musicbrainz3 support])],AC_MSG_NOTICE([Compiling without libmusicbrainz3 support]))
+[with_libmusicbrainz5=check])
+AS_IF([test x$with_libmusicbrainz5 != xno], 
+[PKG_CHECK_MODULES(MUSICBRAINZ,[libmusicbrainz5 libcurl],[MUSICBRAINZ_DEFINES=-DHAVE_MUSICBRAINZ AC_DEFINE([MUSICBRAINZ_ENABLED],[1],[Define to 1 if you have musicbrainz5 support])],AC_MSG_NOTICE([Compiling without libmusicbrainz5 support]))
 AC_SUBST(MUSICBRAINZ_DEFINES)
 AC_SUBST(MUSICBRAINZ_CFLAGS)
 AC_SUBST(MUSICBRAINZ_LIBS)
--- a/src/support.c	(revision 2279)
+++ b/src/support.c	(working copy)
@@ -2375,12 +2375,12 @@
 gchar *get_cover_art_url(gchar * artist, gchar * title, gchar * album)
 {
 int i;
-MbWebService mb;
-MbQuery query;
-MbReleaseFilter release_filter;
-MbResultList results;
-MbRelease release;
-MbReleaseIncludes includes;
+Mb5WebService mb;
+Mb5Query query;
+Mb5ReleaseFilter release_filter;
+Mb5ResultList results;
+Mb5Release release;
+Mb5ReleaseIncludes includes;
 
 char id[1024];
 char asin[1024];
@@ -2393,41 +2393,41 @@
 if (album == NULL  artist == NULL)
 return ret;
 
-mb = mb_webservice_new();
+mb = mb5_webservice_new();
 
-query = mb_query_new(mb, gnome-mplayer);
+query = mb5_query_new(mb, gnome-mplayer);
 
-release_filter = mb_release_filter_new();
+release_filter = mb5_release_filter_new();
 if (release_filter == NULL)
 return ret;
 if (artist != NULL  strlen(artist)  0)
-release_filter = mb_release_filter_artist_name(release_filter, artist);
+release_filter = mb5_release_filter_artist_name(release_filter, artist);
 if (album != NULL  strlen(album)  0)
-release_filter = mb_release_filter_title(release_filter, album);
+release_filter = mb5_release_filter_title(release_filter, album);
 
-results = mb_query_get_releases(query, release_filter);
-mb_release_filter_free(release_filter);
+results = mb5_query_get_releases(query, release_filter);
+mb5_release_filter_free(release_filter);
 
 if (results != NULL) {
-//printf(items found:  %i\n, mb_result_list_get_size(results));
+//printf(items found:  %i\n, mb5_result_list_get_size(results));
 
 highest_score = -1;
-for (i = 0; i  mb_result_list_get_size(results); i++) {
-score = mb_result_list_get_score(results, i);
-release = mb_result_list_get_release(results, i);
+for (i = 0; i  mb5_result_list_get_size(results); i++) {
+score = mb5_result_list_get_score(results, i);
+release = mb5_result_list_get_release(results, i);
 if (release != NULL) {
-mb_release_get_id(release, id, 1024);
-mb_release_free(release);
-includes = mb_release_includes_new();
+mb5_release_get_id(release, id, 1024);
+mb5_release_free(release);
+includes = mb5_release_includes_new();
 if (includes != NULL) {
-includes = mb_track_includes_url_relations(includes);
-release = mb_query_get_release_by_id(query, id, includes);
-mb_release_includes_free(includes);
+includes = mb5_track_includes_url_relations(includes);
+release = mb5_query_get_release_by_id(query, id, includes);
+mb5_release_includes_free(includes);
 }
 }
 if (release != NULL) {
-mb_release_get_asin(release, asin, 1024);
-mb_release_free(release);
+mb5_release_get_asin(release, asin, 1024);
+mb5_release_free(release);
 if (strlen(asin)  0) {
 //printf(asin = %s score = %i\n,asin,score);