[tracker/media-art-enhancements: 5/16] Rename albumart functions to media-art



commit be052339bb63dfd9b487ecb5c84e2ee5fc5d0f85
Author: Sam Thursfield <sam thursfield codethink co uk>
Date:   Wed Oct 12 15:13:04 2011 +0100

    Rename albumart functions to media-art
    
    We now support video posters as well!
    
    Fixes GB#660784

 configure.ac                                       |    8 +-
 src/libtracker-common/Makefile.am                  |    4 +-
 .../{tracker-albumart.c => tracker-media-art.c}    |   50 +++---
 .../{tracker-albumart.h => tracker-media-art.h}    |   20 +-
 src/libtracker-miner/Makefile.am                   |    6 +-
 .../{tracker-albumart.c => tracker-media-art.c}    |   40 ++--
 .../{tracker-albumart.h => tracker-media-art.h}    |   12 +-
 src/libtracker-miner/tracker-miner-fs.c            |    6 +-
 src/libtracker-miner/tracker-miner.h               |    2 +-
 src/tracker-extract/Makefile.am                    |   12 +-
 src/tracker-extract/tracker-extract-gstreamer.c    |   16 +-
 src/tracker-extract/tracker-extract-mp3.c          |   58 +++---
 src/tracker-extract/tracker-main.c                 |   12 +-
 ...-albumart-dummy.c => tracker-media-art-dummy.c} |   18 +-
 ...umart-generic.h => tracker-media-art-generic.h} |   22 ++--
 ...lbumart-pixbuf.c => tracker-media-art-pixbuf.c} |   18 +-
 ...er-albumart-qt.cpp => tracker-media-art-qt.cpp} |   18 +-
 .../{tracker-albumart.c => tracker-media-art.c}    |  182 ++++++++++----------
 .../{tracker-albumart.h => tracker-media-art.h}    |   24 ++--
 19 files changed, 264 insertions(+), 264 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7986cf5..1fa765d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1565,7 +1565,7 @@ AC_ARG_ENABLE(qt,
                              [enable Qt support, (MP3 album art) [[default=auto]]]),,
               [enable_qt=auto])
 
-selected_for_albumart="no  (disabled)"
+selected_for_media_art="no  (disabled)"
 
 ##################################################################
 # Check for tracker-extract: Choose between GdkPixbuf/Qt
@@ -1582,7 +1582,7 @@ if test "x$enable_qt" != "xno" && test "x$enable_gdkpixbuf" != "xyes"; then
 
    if test "x$have_qt" = "xyes"; then
       AC_DEFINE(HAVE_QT, [], [Define if we have Qt])
-      selected_for_albumart="yes (qt)"
+      selected_for_media_art="yes (qt)"
    fi
 else
    have_qt="no  (disabled)"
@@ -1607,7 +1607,7 @@ if test "x$enable_gdkpixbuf" != "xno" && test "x$enable_quill" != "xyes"; then
 
    if test "x$have_gdkpixbuf" = "xyes"; then
       AC_DEFINE(HAVE_GDKPIXBUF, [], [Define if we have GdkPixbuf])
-      selected_for_albumart="yes (GdkPixbuf)"
+      selected_for_media_art="yes (GdkPixbuf)"
    fi
 else
    have_gdkpixbuf="no  (disabled)"
@@ -2349,7 +2349,7 @@ Metadata Extractors:
 	Support XML / HTML:                     $have_libxml2
 	Support embedded / sidecar XMP:         $have_exempi
 	Support generic media formats:          $have_generic_media_handler ($have_generic_media_handler_app) (backend: $gstreamer_backend)
-	Support MP3 album art:                  $selected_for_albumart
+	Support media art processing:           $selected_for_media_art
 	Support cue sheet parsing:              $have_libcue
 	Support playlists (w/ Totem):           $have_playlist
 
diff --git a/src/libtracker-common/Makefile.am b/src/libtracker-common/Makefile.am
index 406ca38..9f037ae 100644
--- a/src/libtracker-common/Makefile.am
+++ b/src/libtracker-common/Makefile.am
@@ -30,7 +30,7 @@ libtracker_common_la_SOURCES = \
 	tracker-utils.c \
 	tracker-crc32.c \
 	tracker-locale.c \
-	tracker-albumart.c
+	tracker-media-art.c
 
 noinst_HEADERS = \
 	tracker-dbus.h \
@@ -49,7 +49,7 @@ noinst_HEADERS = \
 	tracker-utils.h \
 	tracker-crc32.h \
 	tracker-locale.h \
-	tracker-albumart.h
+	tracker-media-art.h
 
 if HAVE_TRACKER_FTS
 libtracker_common_la_SOURCES += tracker-language.c
diff --git a/src/libtracker-common/tracker-albumart.c b/src/libtracker-common/tracker-media-art.c
similarity index 82%
rename from src/libtracker-common/tracker-albumart.c
rename to src/libtracker-common/tracker-media-art.c
index 7974cdb..bdc9b5d 100644
--- a/src/libtracker-common/tracker-albumart.c
+++ b/src/libtracker-common/tracker-media-art.c
@@ -36,10 +36,10 @@
 
 #include "tracker-file-utils.h"
 #include "tracker-date-time.h"
-#include "tracker-albumart.h"
+#include "tracker-media-art.h"
 
 static gboolean
-albumart_strip_find_next_block (const gchar    *original,
+media_art_strip_find_next_block (const gchar    *original,
                                 const gunichar  open_char,
                                 const gunichar  close_char,
                                 gint           *open_pos,
@@ -75,11 +75,11 @@ albumart_strip_find_next_block (const gchar    *original,
 }
 
 /**
- * tracker_albumart_strip_invalid_entities:
+ * tracker_media_art_strip_invalid_entities:
  * @original: original string
  *
  * Strip a albumname or artistname string to prepare it for calculating the
- * albumart path with it. Certain characters and charactersets will be stripped
+ * media art path with it. Certain characters and charactersets will be stripped
  * and a newly allocated string returned which you must free with g_free.
  *
  * Returns: copy of original but then stripped
@@ -87,7 +87,7 @@ albumart_strip_find_next_block (const gchar    *original,
  * Since: 0.10.14
  */
 gchar *
-tracker_albumart_strip_invalid_entities (const gchar *original)
+tracker_media_art_strip_invalid_entities (const gchar *original)
 {
 	GString *str_no_blocks;
 	gchar **strv;
@@ -120,7 +120,7 @@ tracker_albumart_strip_invalid_entities (const gchar *original)
 			gint start, end;
 
 			/* Go through blocks, find the earliest block we can */
-			if (albumart_strip_find_next_block (p, blocks[i][0], blocks[i][1], &start, &end)) {
+			if (media_art_strip_find_next_block (p, blocks[i][0], blocks[i][1], &start, &end)) {
 				if (pos1 == -1 || start < pos1) {
 					pos1 = start;
 					pos2 = end;
@@ -181,9 +181,9 @@ tracker_albumart_strip_invalid_entities (const gchar *original)
 }
 
 static gchar *
-albumart_checksum_for_data (GChecksumType  checksum_type,
-                            const guchar  *data,
-                            gsize          length)
+media_art_checksum_for_data (GChecksumType  checksum_type,
+                             const guchar  *data,
+                             gsize          length)
 {
 	GChecksum *checksum;
 	gchar *retval;
@@ -201,7 +201,7 @@ albumart_checksum_for_data (GChecksumType  checksum_type,
 }
 
 /**
- * tracker_albumart_get_path:
+ * tracker_media_art_get_path:
  * @artist: the artist
  * @album: the album
  * @prefix: For example "album"
@@ -209,18 +209,18 @@ albumart_checksum_for_data (GChecksumType  checksum_type,
  * @path: the location to store the local path
  * @local_uri: the location to store the local uri or NULL
  *
- * Get the path to albumart for a given album or song. Newly allocated data in
+ * Get the path to media art for a given album or song. Newly allocated data in
  * @path and @local_uri must be freed with g_free.
  *
  * Since: 0.10.14
  */
 void
-tracker_albumart_get_path (const gchar  *artist,
-                           const gchar  *album,
-                           const gchar  *prefix,
-                           const gchar  *uri,
-                           gchar       **path,
-                           gchar       **local_uri)
+tracker_media_art_get_path (const gchar  *artist,
+                            const gchar  *album,
+                            const gchar  *prefix,
+                            const gchar  *uri,
+                            gchar       **path,
+                            gchar       **local_uri)
 {
 	gchar *art_filename;
 	gchar *dir;
@@ -245,13 +245,13 @@ tracker_albumart_get_path (const gchar  *artist,
 	if (!artist) {
 		artist_stripped = g_strdup (" ");
 	} else {
-		artist_stripped = tracker_albumart_strip_invalid_entities (artist);
+		artist_stripped = tracker_media_art_strip_invalid_entities (artist);
 	}
 
 	if (!album) {
 		album_stripped = g_strdup (" ");
 	} else {
-		album_stripped = tracker_albumart_strip_invalid_entities (album);
+		album_stripped = tracker_media_art_strip_invalid_entities (album);
 	}
 
 	artist_down = g_utf8_strdown (artist_stripped, -1);
@@ -270,12 +270,12 @@ tracker_albumart_get_path (const gchar  *artist,
 		g_mkdir_with_parents (dir, 0770);
 	}
 
-	artist_checksum = albumart_checksum_for_data (G_CHECKSUM_MD5,
-	                                              (const guchar *) artist_down,
-	                                              strlen (artist_down));
-	album_checksum = albumart_checksum_for_data (G_CHECKSUM_MD5,
-	                                             (const guchar *) album_down,
-	                                             strlen (album_down));
+	artist_checksum = media_art_checksum_for_data (G_CHECKSUM_MD5,
+	                                               (const guchar *) artist_down,
+	                                               strlen (artist_down));
+	album_checksum = media_art_checksum_for_data (G_CHECKSUM_MD5,
+	                                              (const guchar *) album_down,
+	                                              strlen (album_down));
 
 	g_free (artist_down);
 	g_free (album_down);
diff --git a/src/libtracker-common/tracker-albumart.h b/src/libtracker-common/tracker-media-art.h
similarity index 61%
rename from src/libtracker-common/tracker-albumart.h
rename to src/libtracker-common/tracker-media-art.h
index 90f461b..73ffa0c 100644
--- a/src/libtracker-common/tracker-albumart.h
+++ b/src/libtracker-common/tracker-media-art.h
@@ -17,8 +17,8 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __LIBTRACKER_COMMON_ALBUMART_H__
-#define __LIBTRACKER_COMMON_ALBUMART_H__
+#ifndef __LIBTRACKER_COMMON_MEDIA_ART_H__
+#define __LIBTRACKER_COMMON_MEDIA_ART_H__
 
 #include <glib.h>
 
@@ -28,15 +28,15 @@ G_BEGIN_DECLS
 #error "only <libtracker-common/tracker-common.h> must be included directly."
 #endif
 
-gchar * tracker_albumart_strip_invalid_entities (const gchar  *original);
-void    tracker_albumart_get_path               (const gchar  *artist,
-                                                 const gchar  *album,
-                                                 const gchar  *prefix,
-                                                 const gchar  *uri,
-                                                 gchar       **path,
-                                                 gchar       **local_uri);
+gchar * tracker_media_art_strip_invalid_entities (const gchar  *original);
+void    tracker_media_art_get_path               (const gchar  *artist,
+                                                  const gchar  *album,
+                                                  const gchar  *prefix,
+                                                  const gchar  *uri,
+                                                  gchar       **path,
+                                                  gchar       **local_uri);
 
 
 G_END_DECLS
 
-#endif /* __LIBTRACKER_COMMON_LOCALE_H__ */
+#endif /* __LIBTRACKER_COMMON_MEDIA_ART_H__ */
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index 34da63d..8a64a95 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -71,12 +71,12 @@ libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES =    \
 	tracker-password-provider.c                    \
 	tracker-thumbnailer.c                          \
 	tracker-thumbnailer.h                          \
-	tracker-albumart.c                             \
-	tracker-albumart.h
+	tracker-media-art.c                            \
+	tracker-media-art.h
 
 libtracker_minerinclude_HEADERS =                      \
-	tracker-albumart.h                             \
 	tracker-crawler.h                              \
+	tracker-media-art.h                            \
 	tracker-miner.h                                \
 	tracker-miner-common.h                         \
 	tracker-miner-object.h                         \
diff --git a/src/libtracker-miner/tracker-albumart.c b/src/libtracker-miner/tracker-media-art.c
similarity index 84%
rename from src/libtracker-miner/tracker-albumart.c
rename to src/libtracker-miner/tracker-media-art.c
index bcef407..3f6d79d 100644
--- a/src/libtracker-miner/tracker-albumart.c
+++ b/src/libtracker-miner/tracker-media-art.c
@@ -24,10 +24,10 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
-#include <libtracker-common/tracker-albumart.h>
+#include <libtracker-common/tracker-media-art.h>
 #include <libtracker-sparql/tracker-sparql.h>
 
-#include "tracker-albumart.h"
+#include "tracker-media-art.h"
 
 static gboolean had_any = FALSE;
 static guint timer_id = 0;
@@ -81,25 +81,25 @@ on_query_finished (GObject      *source_object,
 		artist = tracker_sparql_cursor_get_value_type (cursor, 1) != TRACKER_SPARQL_VALUE_TYPE_UNBOUND ? tracker_sparql_cursor_get_string (cursor, 1, NULL) : NULL;
 
 		/* The get_path API does stripping itself */
-		tracker_albumart_get_path (artist,
-		                           album,
-		                           "album", NULL,
-		                           &target, NULL);
+		tracker_media_art_get_path (artist,
+		                            album,
+		                            "album", NULL,
+		                            &target, NULL);
 
 		g_hash_table_replace (table, target, target);
 
 		/* Also add the file to which the symlinks are made */
-		tracker_albumart_get_path (NULL,
-		                           album,
-		                           "album", NULL,
-		                           &album_path, NULL);
+		tracker_media_art_get_path (NULL,
+		                            album,
+		                            "album", NULL,
+		                            &album_path, NULL);
 
 
 		g_hash_table_replace (table, album_path, album_path);
 	}
 
-	/* Perhaps we should have an internal list of albumart files that we made,
-	 * instead of going over all the albumart (which could also have been made
+	/* Perhaps we should have an internal list of media art files that we made,
+	 * instead of going over all the media art (which could also have been made
 	 * by other softwares) */
 
 	for (name = g_dir_read_name (dir); name != NULL; name = g_dir_read_name (dir)) {
@@ -146,21 +146,21 @@ on_error:
 	}
 }
 /**
- * tracker_albumart_remove_add:
+ * tracker_media_art_remove_add:
  * @connection: SPARQL connection of this miner
  * @uri: URI of the file
  * @mime_type: mime-type of the file
  *
- * Adds a new request to tell the albumart subsystem that @uri was removed.
- * Stored requests can be processed with tracker_albumart_check_cleanup().
+ * Adds a new request to tell the media art subsystem that @uri was removed.
+ * Stored requests can be processed with tracker_media_art_check_cleanup().
  *
  * Returns: #TRUE if successfully stored to be reported, #FALSE otherwise.
  *
  * Since: 0.10.4
  */
 gboolean
-tracker_albumart_remove_add (const gchar *uri,
-                             const gchar *mime_type)
+tracker_media_art_remove_add (const gchar *uri,
+                              const gchar *mime_type)
 {
 	/* mime_type can be NULL */
 
@@ -201,14 +201,14 @@ on_timer_destroy (gpointer data)
 }
 
 /**
- * tracker_albumart_check_cleanup:
+ * tracker_media_art_check_cleanup:
  *
- * Process all stored albumart requests.
+ * Process all stored media art requests.
  *
  * Since: 0.10.4
  */
 void
-tracker_albumart_check_cleanup (TrackerSparqlConnection *connection)
+tracker_media_art_check_cleanup (TrackerSparqlConnection *connection)
 {
 	if (had_any && timer_id == 0) {
 
diff --git a/src/libtracker-miner/tracker-albumart.h b/src/libtracker-miner/tracker-media-art.h
similarity index 74%
rename from src/libtracker-miner/tracker-albumart.h
rename to src/libtracker-miner/tracker-media-art.h
index 49637c6..794e8a0 100644
--- a/src/libtracker-miner/tracker-albumart.h
+++ b/src/libtracker-miner/tracker-media-art.h
@@ -17,8 +17,8 @@
  * 02110-1301  USA
  */
 
-#ifndef __LIBTRACKER_MINER_ALBUMART_H__
-#define __LIBTRACKER_MINER_ALBUMART_H__
+#ifndef __LIBTRACKER_MINER_MEDIA_ART_H__
+#define __LIBTRACKER_MINER_MEDIA_ART_H__
 
 #include <libtracker-sparql/tracker-sparql.h>
 
@@ -28,9 +28,9 @@
 
 G_BEGIN_DECLS
 
-gboolean tracker_albumart_remove_add    (const gchar             *uri,
-                                         const gchar             *mime_type);
-void     tracker_albumart_check_cleanup (TrackerSparqlConnection *connection);
+gboolean tracker_media_art_remove_add    (const gchar             *uri,
+                                          const gchar             *mime_type);
+void     tracker_media_art_check_cleanup (TrackerSparqlConnection *connection);
 G_END_DECLS
 
-#endif /* __LIBTRACKER_MINER_ALBUMART_H__ */
+#endif /* __LIBTRACKER_MINER_MEDIA_ART_H__ */
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 104db35..3f477b7 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -28,7 +28,7 @@
 #include "tracker-crawler.h"
 #include "tracker-marshal.h"
 #include "tracker-miner-fs.h"
-#include "tracker-albumart.h"
+#include "tracker-media-art.h"
 #include "tracker-monitor.h"
 #include "tracker-utils.h"
 #include "tracker-thumbnailer.h"
@@ -2031,7 +2031,7 @@ item_remove (TrackerMinerFS *fs,
 	}
 
 	tracker_thumbnailer_remove_add (uri, mime);
-	tracker_albumart_remove_add (uri, mime);
+	tracker_media_art_remove_add (uri, mime);
 
 	g_free (mime);
 
@@ -3018,7 +3018,7 @@ item_queue_handlers_cb (gpointer user_data)
 				process_stop (fs);
 
 				tracker_thumbnailer_send ();
-				tracker_albumart_check_cleanup (tracker_miner_get_connection (TRACKER_MINER (fs)));
+				tracker_media_art_check_cleanup (tracker_miner_get_connection (TRACKER_MINER (fs)));
 			} else {
 				/* Flush any possible pending update here */
 				tracker_sparql_buffer_flush (fs->priv->sparql_buffer,
diff --git a/src/libtracker-miner/tracker-miner.h b/src/libtracker-miner/tracker-miner.h
index 59775c0..aa94333 100644
--- a/src/libtracker-miner/tracker-miner.h
+++ b/src/libtracker-miner/tracker-miner.h
@@ -25,7 +25,7 @@
 #include <libtracker-miner/tracker-crawler.h>
 #include <libtracker-miner/tracker-storage.h>
 #include <libtracker-miner/tracker-thumbnailer.h>
-#include <libtracker-miner/tracker-albumart.h>
+#include <libtracker-miner/tracker-media-art.h>
 #include <libtracker-miner/tracker-network-provider.h>
 #include <libtracker-miner/tracker-password-provider.h>
 #include <libtracker-miner/tracker-miner-object.h>
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index ee6965d..105899d 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -429,19 +429,19 @@ libexec_PROGRAMS = tracker-extract
 
 tracker_extract_SOURCES = \
 	$(marshal_sources) \
-	tracker-albumart.c \
-	tracker-albumart.h \
 	tracker-config.c \
 	tracker-config.h \
 	tracker-controller.c \
 	tracker-controller.h \
 	tracker-extract.c \
 	tracker-extract.h \
+	tracker-media-art.c \
+	tracker-media-art.h \
 	tracker-read.c \
 	tracker-read.h \
 	tracker-main.c \
 	tracker-main.h \
-	tracker-albumart-generic.h
+	tracker-media-art-generic.h
 
 tracker_extract_LDADD = \
 	$(top_builddir)/src/libtracker-extract/libtracker-extract- TRACKER_API_VERSION@.la \
@@ -463,12 +463,12 @@ tracker_extract_SOURCES += tracker-topanalyzer.cpp tracker-topanalyzer.h
 endif
 
 if HAVE_GDKPIXBUF
-tracker_extract_SOURCES += tracker-albumart-pixbuf.c
+tracker_extract_SOURCES += tracker-media-art-pixbuf.c
 else
 if HAVE_QT
-tracker_extract_SOURCES += tracker-albumart-qt.cpp
+tracker_extract_SOURCES += tracker-media-art-qt.cpp
 else
-tracker_extract_SOURCES += tracker-albumart-dummy.c
+tracker_extract_SOURCES += tracker-media-art-dummy.c
 endif
 endif
 
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 29848cc..fc1038e 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -53,7 +53,7 @@
 #include <libtracker-common/tracker-common.h>
 #include <libtracker-extract/tracker-extract.h>
 
-#include "tracker-albumart.h"
+#include "tracker-media-art.h"
 #include "tracker-cue-sheet.h"
 
 /* We wait this long (seconds) for NULL state before freeing */
@@ -2021,13 +2021,13 @@ tracker_extract_gstreamer (const gchar          *uri,
 	                  graph);
 
 	if (media_type != TRACKER_MEDIA_ART_NONE) {
-		tracker_albumart_process (extractor->album_art_data,
-		                          extractor->album_art_size,
-		                          extractor->album_art_mime,
-		                          media_type,
-		                          media_artist,
-		                          media_title,
-		                          uri);
+		tracker_media_art_process (extractor->album_art_data,
+		                           extractor->album_art_size,
+		                           extractor->album_art_mime,
+		                           media_type,
+		                           media_artist,
+		                           media_title,
+		                           uri);
 	}
 
 	g_free (media_artist);
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index 543448c..9842e5a 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -44,7 +44,7 @@
 
 #include <libtracker-extract/tracker-extract.h>
 
-#include "tracker-albumart.h"
+#include "tracker-media-art.h"
 
 #ifdef FRAME_ENABLE_TRACE
 #warning Frame traces enabled
@@ -57,7 +57,7 @@
  * with unlimited size (might need to create private copy in some
  * special cases, finding continuous space etc). We now take 5 first
  * MB of the file and assume that this is enough. In theory there is
- * no maximum size as someone could embed 50 gigabytes of albumart
+ * no maximum size as someone could embed 50 gigabytes of album art
  * there.
  */
 
@@ -173,9 +173,9 @@ typedef struct {
 	gint set_number;
 	gint set_count;
 
-	unsigned char *albumart_data;
-	size_t albumart_size;
-	gchar *albumart_mime;
+	unsigned char *media_art_data;
+	size_t media_art_size;
+	gchar *media_art_mime;
 
 	id3tag id3v1;
 	id3v2tag id3v22;
@@ -1246,14 +1246,14 @@ get_id3v24_tags (id3v24frame           frame,
 		pic_type  =  data[pos + 1 + mime_len + 1];
 		desc      = &data[pos + 1 + mime_len + 1 + 1];
 
-		if (pic_type == 3 || (pic_type == 0 && filedata->albumart_size == 0)) {
+		if (pic_type == 3 || (pic_type == 0 && filedata->media_art_size == 0)) {
 			offset = pos + 1 + mime_len + 2;
 			offset += id3v2_strlen (text_type, desc, csize - offset) + id3v2_nul_size (text_type);
 
-			filedata->albumart_data = g_malloc0 (csize - offset);
-			filedata->albumart_mime = g_strndup (mime, mime_len);
-			memcpy (filedata->albumart_data, &data[offset], csize - offset);
-			filedata->albumart_size = csize - offset;
+			filedata->media_art_data = g_malloc0 (csize - offset);
+			filedata->media_art_mime = g_strndup (mime, mime_len);
+			memcpy (filedata->media_art_data, &data[offset], csize - offset);
+			filedata->media_art_size = csize - offset;
 		}
 		break;
 	}
@@ -1432,14 +1432,14 @@ get_id3v23_tags (id3v24frame           frame,
 		pic_type  =  data[pos + 1 + mime_len + 1];
 		desc      = &data[pos + 1 + mime_len + 1 + 1];
 
-		if (pic_type == 3 || (pic_type == 0 && filedata->albumart_size == 0)) {
+		if (pic_type == 3 || (pic_type == 0 && filedata->media_art_size == 0)) {
 			offset = pos + 1 + mime_len + 2;
 			offset += id3v2_strlen (text_type, desc, csize - offset) + id3v2_nul_size (text_type);
 
-			filedata->albumart_data = g_malloc0 (csize - offset);
-			filedata->albumart_mime = g_strndup (mime, mime_len);
-			memcpy (filedata->albumart_data, &data[offset], csize - offset);
-			filedata->albumart_size = csize - offset;
+			filedata->media_art_data = g_malloc0 (csize - offset);
+			filedata->media_art_mime = g_strndup (mime, mime_len);
+			memcpy (filedata->media_art_data, &data[offset], csize - offset);
+			filedata->media_art_size = csize - offset;
 		}
 		break;
 	}
@@ -1609,14 +1609,14 @@ get_id3v20_tags (id3v2frame            frame,
 		pic_type  =  data[pos + 1 + 3];
 		desc      = &data[pos + 1 + 3 + 1];
 
-		if (pic_type == 3 || (pic_type == 0 && filedata->albumart_size == 0)) {
+		if (pic_type == 3 || (pic_type == 0 && filedata->media_art_size == 0)) {
 			offset = pos + 1 + 3 + 1;
 			offset += id3v2_strlen (text_type, desc, csize - offset) + id3v2_nul_size (text_type);
 
-			filedata->albumart_mime = g_strndup (mime, 3);
-			filedata->albumart_data = g_malloc0 (csize - offset);
-			memcpy (filedata->albumart_data, &data[offset], csize - offset);
-			filedata->albumart_size = csize - offset;
+			filedata->media_art_mime = g_strndup (mime, 3);
+			filedata->media_art_data = g_malloc0 (csize - offset);
+			memcpy (filedata->media_art_data, &data[offset], csize - offset);
+			filedata->media_art_size = csize - offset;
 		}
 	} else {
 		/* text frames */
@@ -2503,15 +2503,15 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
 	/* Get mp3 stream info */
 	mp3_parse (buffer, buffer_size, audio_offset, uri, metadata, &md);
 
-	tracker_albumart_process (md.albumart_data,
-	                          md.albumart_size,
-	                          md.albumart_mime,
-	                          TRACKER_MEDIA_ART_ALBUM,
-	                          md.performer,
-	                          md.album,
-	                          uri);
-	g_free (md.albumart_data);
-	g_free (md.albumart_mime);
+	tracker_media_art_process (md.media_art_data,
+	                           md.media_art_size,
+	                           md.media_art_mime,
+	                           TRACKER_MEDIA_ART_ALBUM,
+	                           md.performer,
+	                           md.album,
+	                           uri);
+	g_free (md.media_art_data);
+	g_free (md.media_art_mime);
 
 	id3v2tag_free (&md.id3v22);
 	id3v2tag_free (&md.id3v23);
diff --git a/src/tracker-extract/tracker-main.c b/src/tracker-extract/tracker-main.c
index 4b2ea61..7773ebe 100644
--- a/src/tracker-extract/tracker-main.c
+++ b/src/tracker-extract/tracker-main.c
@@ -47,7 +47,7 @@
 
 #include <libtracker-data/tracker-db-manager.h>
 
-#include "tracker-albumart.h"
+#include "tracker-media-art.h"
 #include "tracker-config.h"
 #include "tracker-main.h"
 #include "tracker-extract.h"
@@ -278,7 +278,7 @@ run_standalone (TrackerConfig *config)
 	}
 
 	tracker_locale_init ();
-	tracker_albumart_init ();
+	tracker_media_art_init ();
 
 	/* This makes sure we don't steal all the system's resources */
 	initialize_priority_and_scheduling (tracker_config_get_sched_idle (config),
@@ -294,7 +294,7 @@ run_standalone (TrackerConfig *config)
 	if (!object) {
 		g_object_unref (file);
 		g_free (uri);
-		tracker_albumart_shutdown ();
+		tracker_media_art_shutdown ();
 		tracker_locale_shutdown ();
 		return EXIT_FAILURE;
 	}
@@ -307,7 +307,7 @@ run_standalone (TrackerConfig *config)
 	g_object_unref (file);
 	g_free (uri);
 
-	tracker_albumart_shutdown ();
+	tracker_media_art_shutdown ();
 	tracker_locale_shutdown ();
 
 	return EXIT_SUCCESS;
@@ -444,7 +444,7 @@ main (int argc, char *argv[])
 #endif /* THREAD_ENABLE_TRACE */
 
 	tracker_locale_init ();
-	tracker_albumart_init ();
+	tracker_media_art_init ();
 
 	/* Main loop */
 	main_loop = g_main_loop_new (NULL, FALSE);
@@ -457,7 +457,7 @@ main (int argc, char *argv[])
 	g_message ("Shutdown started");
 
 	/* Shutdown subsystems */
-	tracker_albumart_shutdown ();
+	tracker_media_art_shutdown ();
 	tracker_locale_shutdown ();
 
 	g_object_unref (object);
diff --git a/src/tracker-extract/tracker-albumart-dummy.c b/src/tracker-extract/tracker-media-art-dummy.c
similarity index 66%
rename from src/tracker-extract/tracker-albumart-dummy.c
rename to src/tracker-extract/tracker-media-art-dummy.c
index 6b1bc27..64462b7 100644
--- a/src/tracker-extract/tracker-albumart-dummy.c
+++ b/src/tracker-extract/tracker-media-art-dummy.c
@@ -20,30 +20,30 @@
  * Philip Van Hoof <philip codeminded be>
  */
 
-#include "tracker-albumart-generic.h"
+#include "tracker-media-art-generic.h"
 
 void
-tracker_albumart_plugin_init (void)
+tracker_media_art_plugin_init (void)
 {
 }
 
 void
-tracker_albumart_plugin_shutdown (void)
+tracker_media_art_plugin_shutdown (void)
 {
 }
 
 gboolean
-tracker_albumart_file_to_jpeg (const gchar *filename,
-                               const gchar *target)
+tracker_media_art_file_to_jpeg (const gchar *filename,
+                                const gchar *target)
 {
 	return FALSE;
 }
 
 gboolean
-tracker_albumart_buffer_to_jpeg (const unsigned char *buffer,
-                                 size_t               len,
-                                 const gchar         *buffer_mime,
-                                 const gchar         *target)
+tracker_media_art_buffer_to_jpeg (const unsigned char *buffer,
+                                  size_t               len,
+                                  const gchar         *buffer_mime,
+                                  const gchar         *target)
 {
 	return FALSE;
 }
diff --git a/src/tracker-extract/tracker-albumart-generic.h b/src/tracker-extract/tracker-media-art-generic.h
similarity index 57%
rename from src/tracker-extract/tracker-albumart-generic.h
rename to src/tracker-extract/tracker-media-art-generic.h
index aaa4f51..53bbab6 100644
--- a/src/tracker-extract/tracker-albumart-generic.h
+++ b/src/tracker-extract/tracker-media-art-generic.h
@@ -20,23 +20,23 @@
  * Philip Van Hoof <philip codeminded be>
  */
 
-#ifndef __TRACKER_ALBUMART_GENERIC_H__
-#define __TRACKER_ALBUMART_GENERIC_H__
+#ifndef __TRACKER_MEDIA_ART_GENERIC_H__
+#define __TRACKER_MEDIA_ART_GENERIC_H__
 
 #include <glib.h>
 
 G_BEGIN_DECLS
 
-void      tracker_albumart_plugin_init     (void);
-void      tracker_albumart_plugin_shutdown (void);
+void      tracker_media_art_plugin_init     (void);
+void      tracker_media_art_plugin_shutdown (void);
 
-gboolean  tracker_albumart_file_to_jpeg    (const gchar         *filename,
-                                            const gchar         *target);
-gboolean  tracker_albumart_buffer_to_jpeg  (const unsigned char *buffer,
-                                            size_t               len,
-                                            const gchar         *buffer_mime,
-                                            const gchar         *target);
+gboolean  tracker_media_art_file_to_jpeg    (const gchar         *filename,
+                                             const gchar         *target);
+gboolean  tracker_media_art_buffer_to_jpeg  (const unsigned char *buffer,
+                                             size_t               len,
+                                             const gchar         *buffer_mime,
+                                             const gchar         *target);
 
 G_END_DECLS
 
-#endif /* __TRACKER_ALBUMART_GENERIC_H__ */
+#endif /* __TRACKER_MEDIA_ART_GENERIC_H__ */
diff --git a/src/tracker-extract/tracker-albumart-pixbuf.c b/src/tracker-extract/tracker-media-art-pixbuf.c
similarity index 86%
rename from src/tracker-extract/tracker-albumart-pixbuf.c
rename to src/tracker-extract/tracker-media-art-pixbuf.c
index cd943a6..64650d0 100644
--- a/src/tracker-extract/tracker-albumart-pixbuf.c
+++ b/src/tracker-extract/tracker-media-art-pixbuf.c
@@ -22,21 +22,21 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
-#include "tracker-albumart-generic.h"
+#include "tracker-media-art-generic.h"
 
 void
-tracker_albumart_plugin_init (void)
+tracker_media_art_plugin_init (void)
 {
 }
 
 void
-tracker_albumart_plugin_shutdown (void)
+tracker_media_art_plugin_shutdown (void)
 {
 }
 
 gboolean
-tracker_albumart_file_to_jpeg (const gchar *filename,
-                               const gchar *target)
+tracker_media_art_file_to_jpeg (const gchar *filename,
+                                const gchar *target)
 {
 	GdkPixbuf *pixbuf;
 	GError *error = NULL;
@@ -62,10 +62,10 @@ tracker_albumart_file_to_jpeg (const gchar *filename,
 
 
 gboolean
-tracker_albumart_buffer_to_jpeg (const unsigned char *buffer,
-                                 size_t               len,
-                                 const gchar         *buffer_mime,
-                                 const gchar         *target)
+tracker_media_art_buffer_to_jpeg (const unsigned char *buffer,
+                                  size_t               len,
+                                  const gchar         *buffer_mime,
+                                  const gchar         *target)
 {
 	/* FF D8 FF are the three first bytes of JPeg images */
 	if ((g_strcmp0 (buffer_mime, "image/jpeg") == 0 ||
diff --git a/src/tracker-extract/tracker-albumart-qt.cpp b/src/tracker-extract/tracker-media-art-qt.cpp
similarity index 87%
rename from src/tracker-extract/tracker-albumart-qt.cpp
rename to src/tracker-extract/tracker-media-art-qt.cpp
index 9c76714..13c8ff8 100644
--- a/src/tracker-extract/tracker-albumart-qt.cpp
+++ b/src/tracker-extract/tracker-media-art-qt.cpp
@@ -31,14 +31,14 @@
 
 #include <glib.h>
 
-#include "tracker-albumart-generic.h"
+#include "tracker-media-art-generic.h"
 
 G_BEGIN_DECLS
 
 static QApplication *app = NULL;
 
 void
-tracker_albumart_plugin_init (void)
+tracker_media_art_plugin_init (void)
 {
 	int argc = 0;
 	char *argv[2] = { NULL, NULL };
@@ -47,7 +47,7 @@ tracker_albumart_plugin_init (void)
 }
 
 void
-tracker_albumart_plugin_shutdown (void)
+tracker_media_art_plugin_shutdown (void)
 {
 	// Apparently isn't destructing a QApplication something you should do, as
 	// QApplication is designed to work on stack of the main() function.
@@ -56,8 +56,8 @@ tracker_albumart_plugin_shutdown (void)
 }
 
 gboolean
-tracker_albumart_file_to_jpeg (const gchar *filename,
-                               const gchar *target)
+tracker_media_art_file_to_jpeg (const gchar *filename,
+                                const gchar *target)
 {
 	QFile file (filename);
 
@@ -96,10 +96,10 @@ tracker_albumart_file_to_jpeg (const gchar *filename,
 }
 
 gboolean
-tracker_albumart_buffer_to_jpeg (const unsigned char *buffer,
-                                 size_t               len,
-                                 const gchar         *buffer_mime,
-                                 const gchar         *target)
+tracker_media_art_buffer_to_jpeg (const unsigned char *buffer,
+                                  size_t               len,
+                                  const gchar         *buffer_mime,
+                                  const gchar         *target)
 {
 	/* FF D8 FF are the three first bytes of JPeg images */
 	if ((g_strcmp0 (buffer_mime, "image/jpeg") == 0 ||
diff --git a/src/tracker-extract/tracker-albumart.c b/src/tracker-extract/tracker-media-art.c
similarity index 85%
rename from src/tracker-extract/tracker-albumart.c
rename to src/tracker-extract/tracker-media-art.c
index 45a64dc..de3f9ed 100644
--- a/src/tracker-extract/tracker-albumart.c
+++ b/src/tracker-extract/tracker-media-art.c
@@ -38,12 +38,12 @@
 #include <libtracker-miner/tracker-miner.h>
 #include <libtracker-common/tracker-file-utils.h>
 #include <libtracker-common/tracker-date-time.h>
-#include <libtracker-common/tracker-albumart.h>
+#include <libtracker-common/tracker-media-art.h>
 
-#include "tracker-albumart.h"
+#include "tracker-media-art.h"
 #include "tracker-extract.h"
 #include "tracker-marshal.h"
-#include "tracker-albumart-generic.h"
+#include "tracker-media-art-generic.h"
 
 #define ALBUMARTER_SERVICE    "com.nokia.albumart"
 #define ALBUMARTER_PATH       "/com/nokia/albumart/Requester"
@@ -70,8 +70,8 @@ typedef struct {
 
 static gboolean initialized;
 static gboolean disable_requests;
-static TrackerStorage *albumart_storage;
-static GHashTable *albumart_cache;
+static TrackerStorage *media_art_storage;
+static GHashTable *media_art_cache;
 static GDBusConnection *connection;
 
 static void
@@ -224,7 +224,7 @@ convert_from_other_format (const gchar *found,
 
 	target_temp = g_strdup_printf ("%s-tmp", target);
 
-	retval = tracker_albumart_file_to_jpeg (found, target_temp);
+	retval = tracker_media_art_file_to_jpeg (found, target_temp);
 
 	if (retval && (artist == NULL || g_strcmp0 (artist, " ") == 0)) {
 		if (g_rename (target_temp, album_path) == -1) {
@@ -299,12 +299,12 @@ tracker_media_art_search_new (const gchar         *uri,
 	search->type = type;
 
 	if (artist) {
-		temp = tracker_albumart_strip_invalid_entities (artist);
+		temp = tracker_media_art_strip_invalid_entities (artist);
 		search->artist_strdown = g_utf8_strdown (temp, -1);
 		g_free (temp);
 	}
 
-	temp = tracker_albumart_strip_invalid_entities (title);
+	temp = tracker_media_art_strip_invalid_entities (title);
 	search->title_strdown = g_utf8_strdown (temp, -1);
 	g_free (temp);
 
@@ -364,10 +364,10 @@ classify_image_file (TrackerMediaArtSearch *search,
 }
 
 static gchar *
-tracker_albumart_find_external (const gchar         *uri,
-                                TrackerMediaArtType  type,
-                                const gchar         *artist,
-                                const gchar         *title)
+tracker_media_art_find_external (const gchar         *uri,
+                                 TrackerMediaArtType  type,
+                                 const gchar         *artist,
+                                 const gchar         *title)
 {
 	TrackerMediaArtSearch *search;
 	GDir *dir;
@@ -471,11 +471,11 @@ tracker_albumart_find_external (const gchar         *uri,
 }
 
 static gboolean
-albumart_heuristic (const gchar         *artist,
-                    const gchar         *title,
-                    TrackerMediaArtType  type,
-                    const gchar         *filename_uri,
-                    const gchar         *local_uri)
+media_art_heuristic (const gchar         *artist,
+                     const gchar         *title,
+                     TrackerMediaArtType  type,
+                     const gchar         *filename_uri,
+                     const gchar         *local_uri)
 {
 	gchar *art_file_path = NULL;
 	gchar *album_art_file_path = NULL;
@@ -490,16 +490,16 @@ albumart_heuristic (const gchar         *artist,
 	}
 
 	if (artist) {
-		artist_stripped = tracker_albumart_strip_invalid_entities (artist);
+		artist_stripped = tracker_media_art_strip_invalid_entities (artist);
 	}
-	title_stripped = tracker_albumart_strip_invalid_entities (title);
+	title_stripped = tracker_media_art_strip_invalid_entities (title);
 
-	tracker_albumart_get_path (artist_stripped,
-	                           title_stripped,
-	                           media_art_type_name[type],
-	                           NULL,
-	                           &target,
-	                           NULL);
+	tracker_media_art_get_path (artist_stripped,
+	                            title_stripped,
+	                            media_art_type_name[type],
+	                            NULL,
+	                            &target,
+	                            NULL);
 
 	/* Copy from local album art (.mediaartlocal) to spec */
 	if (local_uri) {
@@ -529,7 +529,7 @@ albumart_heuristic (const gchar         *artist,
 		g_object_unref (local_file);
 	}
 
-	art_file_path = tracker_albumart_find_external (filename_uri, type, artist, title);
+	art_file_path = tracker_media_art_find_external (filename_uri, type, artist, title);
 
 	if (art_file_path != NULL) {
 		if (g_str_has_suffix (art_file_path, "jpeg") ||
@@ -557,12 +557,12 @@ albumart_heuristic (const gchar         *artist,
 				g_object_unref (target_file);
 			} else if (file_get_checksum_if_exists (G_CHECKSUM_MD5, art_file_path, &sum1, TRUE, &is_jpeg)) {
 				/* Avoid duplicate artwork for each track in an album */
-				tracker_albumart_get_path (NULL,
-				                           title_stripped,
-				                           media_art_type_name [type],
-				                           NULL,
-				                           &album_art_file_path,
-				                           NULL);
+				tracker_media_art_get_path (NULL,
+				                            title_stripped,
+				                            media_art_type_name [type],
+				                            NULL,
+				                            &album_art_file_path,
+				                            NULL);
 
 				if (is_jpeg) {
 					gchar *sum2 = NULL;
@@ -639,7 +639,7 @@ albumart_heuristic (const gchar         *artist,
 			}
 		} else if (g_str_has_suffix (art_file_path, "png")) {
 			if (!album_art_file_path) {
-				tracker_albumart_get_path (NULL,
+				tracker_media_art_get_path (NULL,
 				                           title_stripped,
 				                           media_art_type_name[type],
 				                           NULL,
@@ -663,13 +663,13 @@ albumart_heuristic (const gchar         *artist,
 }
 
 static gboolean
-albumart_set (const unsigned char *buffer,
-              size_t               len,
-              const gchar         *mime,
-              TrackerMediaArtType  type,
-              const gchar         *artist,
-              const gchar         *title,
-              const gchar         *uri)
+media_art_set (const unsigned char *buffer,
+               size_t               len,
+               const gchar         *mime,
+               TrackerMediaArtType  type,
+               const gchar         *artist,
+               const gchar         *title,
+               const gchar         *uri)
 {
 	gchar *local_path;
 	gboolean retval = FALSE;
@@ -681,17 +681,17 @@ albumart_set (const unsigned char *buffer,
 		return FALSE;
 	}
 
-	tracker_albumart_get_path (artist, title, media_art_type_name[type], NULL, &local_path, NULL);
+	tracker_media_art_get_path (artist, title, media_art_type_name[type], NULL, &local_path, NULL);
 
 	if (type != TRACKER_MEDIA_ART_ALBUM || (artist == NULL || g_strcmp0 (artist, " ") == 0)) {
-		retval = tracker_albumart_buffer_to_jpeg (buffer, len, mime, local_path);
+		retval = tracker_media_art_buffer_to_jpeg (buffer, len, mime, local_path);
 	} else {
 		gchar *album_path;
 
-		tracker_albumart_get_path (NULL, title, media_art_type_name[type], NULL, &album_path, NULL);
+		tracker_media_art_get_path (NULL, title, media_art_type_name[type], NULL, &album_path, NULL);
 
 		if (!g_file_test (album_path, G_FILE_TEST_EXISTS)) {
-			retval = tracker_albumart_buffer_to_jpeg (buffer, len, mime, album_path);
+			retval = tracker_media_art_buffer_to_jpeg (buffer, len, mime, album_path);
 
 			/* If album-space-md5.jpg doesn't exist, make one and make a symlink
 			 * to album-md5-md5.jpg */
@@ -713,7 +713,7 @@ albumart_set (const unsigned char *buffer,
 
 					/* If buffer isn't a JPEG */
 
-					retval = tracker_albumart_buffer_to_jpeg (buffer, len, mime, temp);
+					retval = tracker_media_art_buffer_to_jpeg (buffer, len, mime, temp);
 
 					if (retval && file_get_checksum_if_exists (G_CHECKSUM_MD5, temp, &sum1, FALSE, NULL)) {
 						if (g_strcmp0 (sum1, sum2) == 0) {
@@ -759,7 +759,7 @@ albumart_set (const unsigned char *buffer,
 					} else {
 						/* If album-space-md5.jpg isn't the same as buffer, make a
 						 * new album-md5-md5.jpg */
-						retval = tracker_albumart_buffer_to_jpeg (buffer, len, mime, local_path);
+						retval = tracker_media_art_buffer_to_jpeg (buffer, len, mime, local_path);
 					}
 					g_free (sum1);
 				}
@@ -820,9 +820,9 @@ albumart_request_download (TrackerStorage      *storage,
 }
 
 static void
-albumart_copy_to_local (TrackerStorage *storage,
-                        const gchar    *filename,
-                        const gchar    *local_uri)
+media_art_copy_to_local (TrackerStorage *storage,
+                         const gchar    *filename,
+                         const gchar    *local_uri)
 {
 	GSList *roots, *l;
 	gboolean on_removable_device = FALSE;
@@ -877,7 +877,7 @@ albumart_copy_to_local (TrackerStorage *storage,
 				g_object_unref (dirf);
 			}
 
-			g_debug ("Copying album art from:'%s' to:'%s'",
+			g_debug ("Copying media art from:'%s' to:'%s'",
 			         filename, local_uri);
 
 			g_file_copy_async (from, local_file, 0, 0,
@@ -918,9 +918,9 @@ albumart_queue_cb (GObject      *source_object,
 	if (info->storage && info->art_path &&
 	    g_file_test (info->art_path, G_FILE_TEST_EXISTS)) {
 
-		albumart_copy_to_local (info->storage,
-		                        info->art_path,
-		                        info->local_uri);
+		media_art_copy_to_local (info->storage,
+		                         info->art_path,
+		                         info->local_uri);
 	}
 
 	g_free (info->art_path);
@@ -934,21 +934,21 @@ albumart_queue_cb (GObject      *source_object,
 }
 
 gboolean
-tracker_albumart_init (void)
+tracker_media_art_init (void)
 {
 	GError *error = NULL;
 
 	g_return_val_if_fail (initialized == FALSE, FALSE);
 
-	tracker_albumart_plugin_init ();
+	tracker_media_art_plugin_init ();
 
-	albumart_storage = tracker_storage_new ();
+	media_art_storage = tracker_storage_new ();
 
 	/* Cache to know if we have already handled uris */
-	albumart_cache = g_hash_table_new_full (g_str_hash,
-	                                        g_str_equal,
-	                                        (GDestroyNotify) g_free,
-	                                        NULL);
+	media_art_cache = g_hash_table_new_full (g_str_hash,
+	                                         g_str_equal,
+	                                         (GDestroyNotify) g_free,
+	                                         NULL);
 
 	/* Signal handler for new album art from the extractor */
 	connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
@@ -966,7 +966,7 @@ tracker_albumart_init (void)
 }
 
 void
-tracker_albumart_shutdown (void)
+tracker_media_art_shutdown (void)
 {
 	g_return_if_fail (initialized == TRUE);
 
@@ -974,15 +974,15 @@ tracker_albumart_shutdown (void)
 		g_object_unref (connection);
 	}
 
-	if (albumart_cache) {
-		g_hash_table_unref (albumart_cache);
+	if (media_art_cache) {
+		g_hash_table_unref (media_art_cache);
 	}
 
-	if (albumart_storage) {
-		g_object_unref (albumart_storage);
+	if (media_art_storage) {
+		g_object_unref (media_art_storage);
 	}
 
-	tracker_albumart_plugin_shutdown ();
+	tracker_media_art_plugin_shutdown ();
 
 	initialized = FALSE;
 }
@@ -998,13 +998,13 @@ set_mtime (const gchar *filename, guint64 mtime)
 }
 
 gboolean
-tracker_albumart_process (const unsigned char *buffer,
-                          size_t               len,
-                          const gchar         *mime,
-                          TrackerMediaArtType  type,
-                          const gchar         *artist,
-                          const gchar         *title,
-                          const gchar         *uri)
+tracker_media_art_process (const unsigned char *buffer,
+                           size_t               len,
+                           const gchar         *mime,
+                           TrackerMediaArtType  type,
+                           const gchar         *artist,
+                           const gchar         *title,
+                           const gchar         *uri)
 {
 	gchar *art_path;
 	gchar *local_art_uri = NULL;
@@ -1025,12 +1025,12 @@ tracker_albumart_process (const unsigned char *buffer,
 
 	mtime = tracker_file_get_mtime_uri (uri);
 
-	tracker_albumart_get_path (artist,
-	                           title,
-	                           media_art_type_name[type],
-	                           uri,
-	                           &art_path,
-	                           &local_art_uri);
+	tracker_media_art_get_path (artist,
+	                            title,
+	                            media_art_type_name[type],
+	                            uri,
+	                            &art_path,
+	                            &local_art_uri);
 
 	if (!art_path) {
 		g_debug ("Album art path could not be obtained, not processing any further");
@@ -1047,7 +1047,7 @@ tracker_albumart_process (const unsigned char *buffer,
 	}
 
 	if ((buffer && len > 0) && ((!a_exists) || (a_exists && mtime > a_mtime))) {
-		processed = albumart_set (buffer, len, mime, type, artist, title, uri);
+		processed = media_art_set (buffer, len, mime, type, artist, title, uri);
 		set_mtime (art_path, mtime);
 		created = TRUE;
 	}
@@ -1074,18 +1074,18 @@ tracker_albumart_process (const unsigned char *buffer,
 
 		g_free (dirname);
 
-		if (!g_hash_table_lookup (albumart_cache, key)) {
-			if (!albumart_heuristic (artist,
-			                         title,
-			                         type,
-			                         uri,
-			                         local_art_uri)) {
+		if (!g_hash_table_lookup (media_art_cache, key)) {
+			if (!media_art_heuristic (artist,
+			                          title,
+			                          type,
+			                          uri,
+			                          local_art_uri)) {
 				/* If the heuristic failed, we
 				 * request the download the
 				 * media-art to the media-art
 				 * downloaders
 				 */
-				albumart_request_download (albumart_storage,
+				albumart_request_download (media_art_storage,
 				                           type,
 				                           artist,
 				                           title,
@@ -1095,7 +1095,7 @@ tracker_albumart_process (const unsigned char *buffer,
 
 			set_mtime (art_path, mtime);
 
-			g_hash_table_insert (albumart_cache,
+			g_hash_table_insert (media_art_cache,
 			                     key,
 			                     GINT_TO_POINTER(TRUE));
 		} else {
@@ -1114,9 +1114,9 @@ tracker_albumart_process (const unsigned char *buffer,
 		 * situation might have changed
 		 */
 		if (g_file_test (art_path, G_FILE_TEST_EXISTS)) {
-			albumart_copy_to_local (albumart_storage,
-			                        art_path,
-			                        local_art_uri);
+			media_art_copy_to_local (media_art_storage,
+			                         art_path,
+			                         local_art_uri);
 		}
 	}
 
diff --git a/src/tracker-extract/tracker-albumart.h b/src/tracker-extract/tracker-media-art.h
similarity index 60%
rename from src/tracker-extract/tracker-albumart.h
rename to src/tracker-extract/tracker-media-art.h
index d9f3e2b..980239a 100644
--- a/src/tracker-extract/tracker-albumart.h
+++ b/src/tracker-extract/tracker-media-art.h
@@ -17,8 +17,8 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKER_EXTRACT_ALBUMART_H__
-#define __TRACKER_EXTRACT_ALBUMART_H__
+#ifndef __TRACKER_EXTRACT_MEDIA_ART_H__
+#define __TRACKER_EXTRACT_MEDIA_ART_H__
 
 #include <glib.h>
 
@@ -31,17 +31,17 @@ typedef enum {
 	TRACKER_MEDIA_ART_TYPE_COUNT
 } TrackerMediaArtType;
 
-gboolean tracker_albumart_init     (void);
-void     tracker_albumart_shutdown (void);
+gboolean tracker_media_art_init     (void);
+void     tracker_media_art_shutdown (void);
 
-gboolean tracker_albumart_process  (const unsigned char *buffer,
-                                    size_t               len,
-                                    const gchar         *mime,
-                                    TrackerMediaArtType  type,
-                                    const gchar         *artist,
-                                    const gchar         *title,
-                                    const gchar         *uri);
+gboolean tracker_media_art_process  (const unsigned char *buffer,
+                                     size_t               len,
+                                     const gchar         *mime,
+                                     TrackerMediaArtType  type,
+                                     const gchar         *artist,
+                                     const gchar         *title,
+                                     const gchar         *uri);
 
 G_END_DECLS
 
-#endif /* __TRACKER_EXTRACT_EXTRACT_H__ */
+#endif /* __TRACKER_EXTRACT_MEDIA_ART_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]