Bug 18139 - BBC Podcast OPML listing fails to parse
: BBC Podcast OPML listing fails to parse
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Podcasts
: 7.8.0
: Other Debian Linux
: -- normal (vote)
: 7.8.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-16 13:06 UTC by Martin Williams
Modified: 2015-09-17 13:18 UTC (History)
0 users

See Also:
Category: ---


Attachments
Proposed patch (500 bytes, text/plain)
2015-09-16 13:06 UTC, Martin Williams
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Williams 2015-09-16 13:06:05 UTC
Created attachment 7745 [details]
Proposed patch

The BBC provides a complete listing of its podcasts in OPML format. This gives a very useful way of browsing all their podcast offerings under one head.

http://www.bbc.co.uk/podcasts.opml

After upgrading to LMS 7.8 a couple of months or so ago, I found that the Podcast plugin is unable to parse this OPML listing.

Examining "Slim/Formats/XML.pm" shows the reason for the failure. At around line 650 we have:

 	# Bug 3510 - check for bogus content.
	if ($$content !~ /<\??(?:xml|rss)/) {

The BBC opml listing fails this test. Nevertheless it is in valid OPML format, as best as I can tell, and is certainly not bogus content. The BBC listing starts with the following element: "<opml version="1.1">".

The attached proposed patch resolves the issue by including 'opml' along with 'xml' & 'rss' as an indicator of good content.

The problem would not have occurred had the BBC included an '<?xml' element at the start of the document. However my understanding is that this is not obligatory in an OPML version 1 document, which is based on XML v1.0.
Comment 1 Michael Herger 2015-09-17 13:18:40 UTC
Commit f1cac47f30f508112e407dc40ee5987ddbf94c27 - thanks!