beagle r4379 - trunk/beagle/Filters



Author: dbera
Date: Wed Jan  9 18:29:36 2008
New Revision: 4379
URL: http://svn.gnome.org/viewvc/beagle?rev=4379&view=rev

Log:
Use FileInfo.FullName instead of Indexable.Uri in Filters, since Indexable.Uri could be internal uri. Add patch files to FilterIgnore. We will never index them.


Modified:
   trunk/beagle/Filters/FilterIgnore.cs
   trunk/beagle/Filters/FilterMPlayerVideo.cs
   trunk/beagle/Filters/FilterTotem.cs

Modified: trunk/beagle/Filters/FilterIgnore.cs
==============================================================================
--- trunk/beagle/Filters/FilterIgnore.cs	(original)
+++ trunk/beagle/Filters/FilterIgnore.cs	Wed Jan  9 18:29:36 2008
@@ -63,6 +63,7 @@
 			AddSupportedFlavor (FilterFlavor.NewFromMimeType ("application/x-java")); // .class files
 			AddSupportedFlavor (FilterFlavor.NewFromMimeType ("image/x-eps"));
 			AddSupportedFlavor (FilterFlavor.NewFromMimeType ("application/x-ole-storage")); // .db files
+			AddSupportedFlavor (FilterFlavor.NewFromMimeType ("text/x-patch")); // patch files
 		}
 
 		protected override void DoPullProperties ()

Modified: trunk/beagle/Filters/FilterMPlayerVideo.cs
==============================================================================
--- trunk/beagle/Filters/FilterMPlayerVideo.cs	(original)
+++ trunk/beagle/Filters/FilterMPlayerVideo.cs	Wed Jan  9 18:29:36 2008
@@ -112,6 +112,12 @@
 
 		protected override void DoPullProperties ()
 		{
+			if (FileInfo == null) {
+				Log.Error ("FilterMPlayerVideo: Unable to extract properties for non-file data");
+				Error ();
+				return;
+			}
+
 			SafeProcess pc = new SafeProcess ();
 			pc.Arguments = new string [] { "mplayer", "-vo", "null", "-ao", "null", "-frames", "0", "-identify", FileInfo.FullName };
 			pc.RedirectStandardOutput = true;

Modified: trunk/beagle/Filters/FilterTotem.cs
==============================================================================
--- trunk/beagle/Filters/FilterTotem.cs	(original)
+++ trunk/beagle/Filters/FilterTotem.cs	Wed Jan  9 18:29:36 2008
@@ -89,8 +89,14 @@
 
 		protected override void DoPullProperties ()
 		{
+			if (FileInfo == null) {
+				Log.Error ("FilterTotem: Unable to extract properties for non-file data");
+				Error ();
+				return;
+			}
+
 			SafeProcess pc = new SafeProcess ();
-			pc.Arguments = new string [] { "totem-video-indexer", UriFu.UriToEscapedString (this.Indexable.Uri) };
+			pc.Arguments = new string [] { "totem-video-indexer", FileInfo.FullName };
 			pc.RedirectStandardOutput = true;
 			pc.RedirectStandardError = true;
 



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