summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2010-06-15 09:56:35 +0100
committerArnel A. Borja <arnelborja@src.gnome.org>2013-08-31 00:56:44 +0800
commitde79b57916123fd6948714dc79ad7ecb7e008e58 (patch)
tree7008f1d2d59fd1c2f3cec7e001c79b42bc34756a
parentf074233ef077b6bd172d057493fc4c64cf3a0775 (diff)
downloadlibmediaart-de79b57916123fd6948714dc79ad7ecb7e008e58.tar.gz
libtracker-miner: Added some comments to the content guessing code()
- Added information about WHERE we got the code from - GIO - Added reasoning for why we have the is_multimedia check
-rw-r--r--src/libtracker-miner/tracker-storage.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/libtracker-miner/tracker-storage.c b/src/libtracker-miner/tracker-storage.c
index 31f9eaa..9fde62e 100644
--- a/src/libtracker-miner/tracker-storage.c
+++ b/src/libtracker-miner/tracker-storage.c
@@ -398,6 +398,17 @@ mount_guess_content_type (GFile *mount_root,
device_path);
}
+ /* NOTE: This code was taken from guess_mount_type()
+ * in GIO's gunixmounts.c and adapted purely for
+ * guessing optical media. We don't use the guessing
+ * code for other types such as MEMSTICKS, ZIPs,
+ * IPODs, etc.
+ *
+ * This code may need updating over time since it is
+ * very situational depending on how distributions
+ * mount their devices and how devices are named in
+ * /dev.
+ */
if (strcmp (filesystem_type, "udf") == 0 ||
strcmp (filesystem_type, "iso9660") == 0 ||
strcmp (filesystem_type, "cd9660") == 0 ||
@@ -435,7 +446,13 @@ mount_guess_content_type (GFile *mount_root,
g_free (mount_path);
}
- /* Check we don't have multimedia */
+ /* We try to determine the content type because we don't want
+ * to store Volume information in Tracker about DVDs and media
+ * which has no real data for us to mine.
+ *
+ * Generally, if is_multimedia is TRUE then we end up ignoring
+ * the media.
+ */
guess_type = g_content_type_guess_for_tree (mount_root);
for (i = 0; guess_type && guess_type[i]; i++) {