[sound-juicer] Use libdiscid read_sparse()
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer] Use libdiscid read_sparse()
- Date: Mon, 23 Sep 2013 09:50:58 +0000 (UTC)
commit 1a55823d38bf450d1280e6c6842cdaa19e7ea5bb
Author: Johannes Dewender <gnome JonnyJD net>
Date: Fri Apr 12 19:15:09 2013 +0200
Use libdiscid read_sparse()
read_sparse is available starting with libdiscid 0.5.0.
Using read() started to be slow with 0.3.1, since
now ISRCs and the MCN are read by default.
We now only read what we need.
https://bugzilla.gnome.org/show_bug.cgi?id=697899
libjuicer/sj-metadata-musicbrainz5.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libjuicer/sj-metadata-musicbrainz5.c b/libjuicer/sj-metadata-musicbrainz5.c
index 9604449..86d906a 100644
--- a/libjuicer/sj-metadata-musicbrainz5.c
+++ b/libjuicer/sj-metadata-musicbrainz5.c
@@ -46,6 +46,10 @@
field = g_strdup (buffer); \
}
+#ifndef DISCID_HAVE_SPARSE_READ
+#define discid_read_sparse(disc, dev, i) discid_read(disc, dev)
+#endif
+
#define GCONF_MUSICBRAINZ_SERVER "/apps/sound-juicer/musicbrainz_server"
#define GCONF_PROXY_USE_PROXY "/system/http_proxy/use_http_proxy"
#define GCONF_PROXY_HOST "/system/http_proxy/host"
@@ -547,7 +551,7 @@ mb5_list_albums (SjMetadata *metadata, char **url, GError **error)
priv->disc = discid_new ();
if (priv->disc == NULL)
return NULL;
- if (discid_read (priv->disc, priv->cdrom) == 0)
+ if (discid_read_sparse (priv->disc, priv->cdrom, 0) == 0)
return NULL;
if (url != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]