banshee r4175 - in trunk/banshee: . src/Extensions/Banshee.Podcasting/Banshee.Podcasting



Author: gburt
Date: Thu Jun 19 19:22:12 2008
New Revision: 4175
URL: http://svn.gnome.org/viewvc/banshee?rev=4175&view=rev

Log:
2008-06-19  Gabriel Burt  <gabriel burt gmail com>

	* src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs:
	Try to subscribe to any uri passed on the command line that contains rss,
	xml, feed, or starts with itpc.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs

Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting/PodcastService.cs	Thu Jun 19 19:22:12 2008
@@ -250,12 +250,13 @@
             }
             
             // Handle podcast URIs
-            if (uri.StartsWith ("feed://")) {
-                string url = String.Format ("http://{0}";, uri.Substring (7));
-                Log.DebugFormat ("Subscribing to podcast at {0}", url);
+            if (uri.Contains ("xml") || uri.Contains ("rss") || uri.Contains ("feed") || uri.StartsWith ("itpc")) {
+                if (uri.StartsWith ("feed://") || uri.StartsWith ("itpc://")) {
+                    uri = String.Format ("http://{0}";, uri.Substring (7));
+                }
 
                 // TODO replace autodownload w/ actual default preference
-                FeedsManager.Instance.FeedManager.CreateFeed (url, FeedAutoDownload.None);
+                FeedsManager.Instance.FeedManager.CreateFeed (uri, FeedAutoDownload.None);
                 source.NotifyUser ();
             }
         }



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