GNOME Bugzilla – Bug 568733
User gets no feedback for invalid podcast feeds
Last modified: 2010-08-15 01:05:49 UTC
Attempting to subscribe to the podcast feed at http://thisweekindjango.com/feeds/netcast/twid/, Banshee fails silently. Checking the feed validator (http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fthisweekindjango.com%2Ffeeds%2Fnetcast%2Ftwid%2F) shows the feed is "valid" (although there are some suggestions). Running banshee-1 from the command line gives the following traceback information: [Info 09:55:47.984] Running Banshee 1.4.2: [Ubuntu 8.10 (linux-gnu, i486) @ 2009-01-22 07:54:13 UTC] [Info 09:55:49.253] All services are started 1.134474s [Info 09:55:50.376] nereid Client Started [Warn 09:56:00.495] Caught an exception - 'link' is expected Line 39, position 4. (in `System.Xml') at Mono.Xml2.XmlTextReader.Expect (System.String expected) [0x00000] at Mono.Xml2.XmlTextReader.ReadEndTag () [0x00000] at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] at Mono.Xml2.XmlTextReader.Read () [0x00000] at System.Xml.XmlTextReader.Read () [0x00000] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] at System.Xml.XmlDocument.LoadXml (System.String xml) [0x00000] at Migo.Syndication.RssParser..ctor (System.String url, System.String xml) [0x00000] [Warn 09:56:00.496] Caught an exception - Invalid XML document. (in `Migo') at Migo.Syndication.RssParser..ctor (System.String url, System.String xml) [0x00000] at Migo.Syndication.FeedUpdateTask.OnDownloadDataReceived (System.Object sender, Migo.Net.DownloadStringCompletedEventArgs args) [0x00000]
That feed is not a podcast feed - it has no media enclosures/elements. The real bug here is that we don't report that info/error back to the user. You should be able to click the iTunes link(s) on their website and choose Banshee to handle it and it should subscribe. That site seems to make it pretty hard to get to the actual podcast url.
*** Bug 583563 has been marked as a duplicate of this bug. ***
Bulk changing the assignee to banshee-maint@gnome.bugs to make it easier for people to get updated on all banshee bugs by following that address. It's usually quite apparent who is working on a given bug by the comments and/or patches attached.
Swapping assignee and QA contact
Interesting comment from Gabriel on another bug, that really applies here : To start at the beginning, look at src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs in the OnPodcastAdd method (which is the handler for the PodcastAddAction). From there you can trace that this results in a call like this: FeedsManager.Instance.FeedManager.CreateFeed (uri.ToString (), syncPreference) So, at this point, I believe that a entry is added to the sqlite db PodcastSyndications table, and the url if fetched etc. Keep in mind that podcast URLs that are legitimate or even that previously worked may transiently (or permanently) fail - if a server is down, if there is a software error that generates an invalid feed, etc. I have an idea for how to expose these feed errors to the user. The Podcasts source (in the sources list with Music, Video, Last.fm etc - in the UI) is a subclass of Source (src/Core/Banshee.Services/Banshee.Sources/Source.cs) which has a SetStatus method (actually several overrides to it too) which pops up the thin yellow bar beneath the track list, say when loading an iPod or changing Last.fm stations. When the Podcasts extension loads, it can check (and listen) for feeds with an error (src/Libraries/Migo/Migo.Syndication/Feed.cs - the LastDownloadError property) - and use the SetStatus method on the source to display a message describing the error ("Timed out" "Invalid feed" etc) with actions to Try Again, Unsubscribe, and maybe switch (next/prev) the msgbetween the various feeds that have errors (if > 1).
Yeah, that is exactly that fix I've had in mind for some months but haven't gotten around to implementing. Please do!
OK, it's not perfect but I've committed a first pass at this. It shows errors and allows you do remove the podcast, or merely disable auto updates (eg unsubscribe -- useful if you have a podcast that has gone off-air, perhaps). Please test and file new bugs.