banshee r5089 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Playlists.Formats



Author: blorentz
Date: Sun Mar  1 18:20:38 2009
New Revision: 5089
URL: http://svn.gnome.org/viewvc/banshee?rev=5089&view=rev

Log:
2009-03-01  Bertrand Lorentz  <bertrand lorentz gmail com>

	* src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs:
	Do not throw an exception when trying to sniff an invalid file.



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs	Sun Mar  1 18:20:38 2009
@@ -48,7 +48,11 @@
         
         public static bool MagicHandler (StreamReader stream)
         {
-            return Xspf.Playlist.Sniff (stream);
+            try {
+                return Xspf.Playlist.Sniff (stream);
+            } catch {
+                return false;
+            }
         }
         
         public XspfPlaylistFormat ()



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