tracker r3000 - in trunk: . src/tracker-extract
- From: mottela svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r3000 - in trunk: . src/tracker-extract
- Date: Tue, 3 Mar 2009 00:44:20 +0000 (UTC)
Author: mottela
Date: Tue Mar 3 00:44:19 2009
New Revision: 3000
URL: http://svn.gnome.org/viewvc/tracker?rev=3000&view=rev
Log:
Treat the genre value unknown like other unknown/missing values
Modified:
trunk/ChangeLog
trunk/src/tracker-extract/tracker-extract-gstreamer.c
trunk/src/tracker-extract/tracker-extract-mp3.c
Modified: trunk/src/tracker-extract/tracker-extract-gstreamer.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-gstreamer.c (original)
+++ trunk/src/tracker-extract/tracker-extract-gstreamer.c Tue Mar 3 00:44:19 2009
@@ -239,6 +239,7 @@
extract_metadata (MetadataExtractor *extractor,
GHashTable *metadata)
{
+ gchar *value;
g_return_if_fail (extractor);
g_return_if_fail (metadata);
@@ -340,6 +341,15 @@
if (extractor->videotags) {
add_uint_gst_tag (metadata, "Video:Bitrate", extractor->videotags, GST_TAG_BITRATE);
}
+
+ /* Do some postprocessing (FIXME, or fix gstreamer) */
+ if ( (value = g_hash_table_lookup (metadata, "Audio:Genre")) ) {
+ if (strcmp(value, "Unknown") == 0) {
+ g_hash_table_remove (metadata,
+ "Audio:Genre");
+ }
+ }
+
}
static void
Modified: trunk/src/tracker-extract/tracker-extract-mp3.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-mp3.c (original)
+++ trunk/src/tracker-extract/tracker-extract-mp3.c Tue Mar 3 00:44:19 2009
@@ -412,10 +412,11 @@
}
pos += 30;
- id3->genre = (char *) "";
if ((guint) pos[0] < G_N_ELEMENTS (genre_names)) {
id3->genre = g_strdup (genre_names[(unsigned) pos[0]]);
+ } else {
+ id3->genre = g_strdup ("");
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]