• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 10
[RELEASE] PodCatching Addon
#1
Thumbs Up 
Since yesterday a Addon for Podcast is online. Instead of the "built-in" way of XBMC, this addon take care of "Readed" and "Unreaded" items and is feedet by an opml file.

you find the plugin in the official repository under "audio"
Reply
#2
Hey there - not sure if you've gotten any responses on this. I've downloaded and installed this add-on but I'm having a hard time figuring out why it doesnt like the OPML file that I gave it.

According to your README, the script is looking for the the OPML file in /userdata/addon_data/plugin.audio.PodCatcher (not sure if there's a specific name that the script is looking for). I dropped mine in there (podcasts.opml), but I'm getting an error "Unable to read the OPML-File".

Here's my OPML file - maybe there's specific tags that your script isnt finding in mine? If so, maybe you could share a "template" opml that people could paste their rss urls into.


thanks
jm
Reply
#3
yep having same issue with NPR podcast opml
Reply
#4
yeah, i fixed this problem. i didn't mentioned that some attributes are "optional".


but i didn't push this in the repository cause i'am hunting a additional problem.

for quick fix, replace your local __init__.py whit this https://github.com/raptor2101/PodCatcher..._init__.py
Reply
#5
Raptor 2101 Wrote:yeah, i fixed this problem. i didn't mentioned that some attributes are "optional".


but i didn't push this in the repository cause i'am hunting a additional problem.

for quick fix, replace your local __init__.py whit this https://github.com/raptor2101/PodCatcher..._init__.py

Thanks, I updated my install with this file, it gets further but still crashes when using the OPML file from http://www.npr.org/podcasts.opml

Code:
16:31:17 T:140445967447824 M:2550845440  NOTICE: ['plugin://plugin.audio.podcatcher/', '0', '']
16:31:17 T:140445967447824 M:2550845440  NOTICE: [PodCatcher]: special://profile/addon_data/plugin.audio.podcatcher/opml.xml
16:31:17 T:140445967447824 M:2550591488   DEBUG: xbp_dlopen loading python lib /usr/local/lib64/xbmc/system/python/python24.zip/pyexpat.so. flags: 2
16:31:17 T:140445967447824 M:2551091200   DEBUG: Loading: /home/myth/.xbmc/temp/pyexpat.so
16:31:17 T:140445967447824 M:2551091200   DEBUG: RegisterExtensionLib, adding pyexpat.so (0x7fbc396b2610)
16:31:17 T:140445967447824 M:2551091200   DEBUG: xbp_dlsym - load symbol initpyexpat
16:31:18 T:140445967447824 M:2498695168  NOTICE: [PodCatcher]: Path:
16:31:18 T:140445967447824 M:2498695168  NOTICE: [PodCatcher]: Action: browse
16:31:18 T:140445967447824 M:2498695168  NOTICE: [PodCatcher]: OpmlFolder
16:31:18 T:140445967447824 M:2498695168  NOTICE: [PodCatcher]: Load: http://www.publicbroadcasting.net/wual/.jukebox?action=viewPodcast&podcastId=3783
16:31:18 T:140445967447824 M:2498695168  NOTICE: [PodCatcher]: Downloading from url=http://www.publicbroadcasting.net/wual/.jukebox?action=viewPodcast&podcastId=3783
16:31:18 T:140445967447824 M:2496696320   DEBUG: xbp_dlopen loading python lib /usr/local/lib64/xbmc/system/python/python24.zip/_locale.so. flags: 2
16:31:18 T:140445967447824 M:2496720896   DEBUG: Loading: /home/myth/.xbmc/temp/_locale.so
16:31:18 T:140445967447824 M:2496720896   DEBUG: RegisterExtensionLib, adding _locale.so (0x7fbc08af4090)
16:31:18 T:140445967447824 M:2496720896   DEBUG: xbp_dlsym - load symbol init_locale
16:31:18 T:140445967447824 M:2496720896  NOTICE: [PodCatcher]: Load: http://www.publicbroadcasting.net/wual/.jukebox?action=viewPodcast&podcastId=177
16:31:18 T:140445967447824 M:2496720896  NOTICE: [PodCatcher]: Downloading from url=http://www.publicbroadcasting.net/wual/.jukebox?action=viewPodcast&podcastId=177
16:31:18 T:140445788583696 M:2495127552    INFO: Loading skin file: DialogProgress.xml
16:31:18 T:140445788583696 M:2495127552   DEBUG: Load DialogProgress.xml: 1.04ms
16:31:18 T:140445788583696 M:2495127552   DEBUG: DialogProgress::StartModal called
16:31:18 T:140445788583696 M:2495127552   DEBUG: ------ Window Init (DialogProgress.xml) ------
16:31:18 T:140445788583696 M:2495127552   DEBUG: Alloc resources: 0.81ms (0.00 ms skin load)
16:31:18 T:140447477909664 M:2495000576   DEBUG: LIRC: Update - NEW at 46032994:0000000080010094 00 KEY_PROG1_UP Antec_Veris_RM200 (KEY_PROG1_UP)
16:31:18 T:140445967447824 M:2494464000  NOTICE: [PodCatcher]: OpmlFolder
16:31:18 T:140445967447824 M:2494464000  NOTICE: [PodCatcher]: Load: http://www.npr.org/rss/podcast.php?id=510285
16:31:18 T:140445967447824 M:2494464000  NOTICE: [PodCatcher]: Downloading from url=http://www.npr.org/rss/podcast.php?id=510285
16:31:18 T:140445967447824 M:2494394368  NOTICE: [PodCatcher]: OpmlFolder
16:31:18 T:140445967447824 M:2494394368  NOTICE: [PodCatcher]: Load: http://www.npr.org/holidays
16:31:18 T:140445967447824 M:2494394368  NOTICE: [PodCatcher]: Downloading from url=http://www.npr.org/holidays
16:31:18 T:140447477909664 M:2494148608   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
16:31:19 T:140445967447824 M:2494021632    INFO: -->Python script returned the following error<--
16:31:19 T:140445967447824 M:2494021632   ERROR: Error Type: xml.parsers.expat.ExpatError
16:31:19 T:140445967447824 M:2494021632   ERROR: Error Contents: not well-formed (invalid token): line 4, column 778
16:31:19 T:140445967447824 M:2493894656   ERROR: Traceback (most recent call last):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/default.py", line 105, in ?
                                                opmlFile.displayMenu(path);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 108, in displayMenu
                                                self.opmlFolder.displayMenu(path);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 46, in displayMenu
                                                self.gui.buildMenuEntry(element);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/simplexbmc.py", line 80, in buildMenuEntry
                                                if(menuElement.hasUnreadItems()):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 80, in hasUnreadItems
                                                if(element.hasUnreadItems()):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/__init__.py", line 89, in hasUnreadItems
                                                self.loadFeed();
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/__init__.py", line 97, in loadFeed
                                                self.updateFeed();
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/rss.py", line 33, in updateFeed
                                                xmlDocument = minidom.parseString(xmlPage);
                                              File "../Python/Lib/xml/dom/minidom.py", line 1925, in parseString
                                              File "../Python/Lib/xml/dom/expatbuilder.py", line 940, in parseString
                                              File "../Python/Lib/xml/dom/expatbuilder.py", line 223, in parseString
                                            ExpatError: not well-formed (invalid token): line 4, column 778
16:31:19 T:140445967447824 M:2493894656    INFO: -->End of Python script error report<--
16:31:19 T:140445967447824 M:2493894656    INFO: Python script stopped
16:31:19 T:140445967447824 M:2493894656   DEBUG: Thread 140445967447824 terminating
16:31:19 T:140447477909664 M:2493894656   DEBUG: python thread 157 destructed
16:31:19 T:140447477909664 M:2493894656   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
16:31:19 T:140447477909664 M:2493894656   DEBUG: Alloc resources: 0.01ms (0.00 ms skin load)
16:31:19 T:140445788583696 M:2493894656   DEBUG:  WaitOnScriptResult - plugin exited prematurely - terminating
16:31:19 T:140447477909664 M:2493870080   ERROR: GetDirectory - Error getting plugin://plugin.audio.podcatcher/
16:31:19 T:140447477909664 M:2493870080   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.podcatcher/) failed
16:31:19 T:140447477909664 M:2493870080   DEBUG: CGUIMediaWindow::GetDirectory (addons://sources/audio/)

Seems that the xmlUrl is not well-formed,

Code:
<outline
                                text=""
                                title=""
                                type="rss"
                                version="RSS"
                                imageHref=""
                                description="Fifty of the most memorable stories from NPR in 2007, as selected by NPR.org's editorial team."
                                typicalDurationMins=""
                                orgId="1"
                                topicId="1008"
                                orgName="National Public Radio"
                                topicName="Arts &amp;amp; Life"
                                xmlUrl="http://www.npr.org/holidays"
                                htmlUrl=""
                        />

So the plugin should probably be made more robust by skipping individuals feeds that don't parse, rather than aborting completely, since most OPML files will often be long and have multiple feeds, which may or may not always parse.
Reply
#6
OK, even when I comment-out those broken feeds, still get this error:

Code:
17:02:33 T:140446192355088 M:2439483392    INFO: -->Python script returned the following error<--
17:02:33 T:140446192355088 M:2439483392   ERROR: Error Type: exceptions.AttributeError
17:02:33 T:140446192355088 M:2439483392   ERROR: Error Contents: Comment instance has no attribute 'getAttribute'
17:02:33 T:140446192355088 M:2439610368   ERROR: Traceback (most recent call last):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/default.py", line 80, in ?
                                                opmlFile = OpmlFile(PATH_FILE_OPML, gui);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 98, in __init__
                                                self.opmlFolder = OpmlFolder(bodyNode, self.gui )
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 34, in __init__
                                                element = OpmlFolder(node, self.gui);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 34, in __init__
                                                element = OpmlFolder(node, self.gui);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 36, in __init__
                                                element = FeedFactory.getFeed(node, self.gui)
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/feedfactory.py", line 21, in getFeed
                                                feedVersion = feedNode.getAttribute("type")
                                            AttributeError: Comment instance has no attribute 'getAttribute'
17:02:33 T:140446192355088 M:2439610368    INFO: -->End of Python script error report<--
Reply
#7
you suffer two different erros, with the same source. My parsing algorithm isn't very robust, cause of missing testers... *G*

I will fixe this as soon as possible. As a workaround remove your comments (i guessing you comment out that outline-element)

by the way xmlUrl should link to the RSS/Atom feed. in you case to http://www.npr.org/rss/rss.php?id=1008 instead of http://www.npr.org/series/holidays/.

the last link delivers normal XHTML (wich is seems to be not well formed).

greetings Raptor 2101

sorry for you overhead
Reply
#8
OK, trying a more minimal example, I trimmed my OPML file to the following:

Code:
?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
        <head>
                <title>NPR Podcast Directory</title>
                <dateCreated>Sat, 15 Oct 2005 00:00:00 -0400 </dateCreated>
                <dateModified>Tue, 14 Dec 2010 05:28:49 -0500</dateModified>
                <ownerName>NPR</ownerName>
                <ownerEmail>[email protected]</ownerEmail>
        </head>
        <body>
                <outline text="BySource">
                        <outline
                                text="On The Media NPR/WNYC"
                                title="On The Media NPR/WNYC"
                                type="rss"
                                version="RSS"
                                imageHref=""
                                description="In an era of information overload, On the Media helps you make sense of it all. A weekly program from National Public Radio and WNYC, New York Public Radio."
                                typicalDurationMins=""
                                orgId="553"
                                topicId="1008"
                                orgName="WNYC-AM"
                                topicName="Arts &amp;amp; Life"
                                xmlUrl="http://feeds.wnyc.org/onthemedia"
                                htmlUrl=""
                        />
                </outline>
        </body>
</opml>

but still get errors:

Code:
00:31:44 T:140445909681936 M:1912217600   ERROR: Error Type: exceptions.IndexError
00:31:44 T:140445909681936 M:1912217600   ERROR: Error Contents: list index out of range
00:31:44 T:140445909681936 M:1912344576   ERROR: Traceback (most recent call last):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/default.py", line 105, in ?
                                                opmlFile.displayMenu(path);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 108, in displayMenu
                                                self.opmlFolder.displayMenu(path);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 46, in displayMenu
                                                self.gui.buildMenuEntry(element);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/simplexbmc.py", line 80, in buildMenuEntry
                                                if(menuElement.hasUnreadItems()):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 80, in hasUnreadItems
                                                if(element.hasUnreadItems()):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/__init__.py", line 89, in hasUnreadItems
                                                self.loadFeed();
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/__init__.py", line 97, in loadFeed
                                                self.updateFeed();
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/rss.py", line 60, in updateFeed
                                                enclosureNode = itemNode.getElementsByTagName("enclosure")[0];
                                            IndexError: list index out of range
Reply
#9
i take a closer look at the RSS-Feed. This seems to be a "simple" reding feed not a "podcast". No link to an mediafile is offered.

Code:
<item>
      <title>Wikileaks, the Law and the Press (On The Media: Friday, 10 December 2010)</title>
      <description>In the days since "Cablegate" became international news, there have been a number of suggested strategies to legally punish WikiLeaks and/or Julian Assange. But each would criminalize not only WikiLeaks but news organizations, like &lt;em&gt;The New York Times&lt;/em&gt;, that published those leaks. University of Chicago law professor Geoffrey Stone talks about how the long arm of the law might punish the leaker and the press too.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.wnyc.org/~ff/onthemedia?a=fFXn0EiV0MM:NXjI_5RJddg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/onthemedia?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.wnyc.org/~ff/onthemedia?a=fFXn0EiV0MM:NXjI_5RJddg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/onthemedia?i=fFXn0EiV0MM:NXjI_5RJddg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.wnyc.org/~ff/onthemedia?a=fFXn0EiV0MM:NXjI_5RJddg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/onthemedia?i=fFXn0EiV0MM:NXjI_5RJddg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/onthemedia/~4/fFXn0EiV0MM" height="1" width="1"/&gt;</description>
      <link>http://feeds.wnyc.org/~r/onthemedia/~3/fFXn0EiV0MM/158617</link>
      <pubDate>Mon, 13 Dec 2010 20:49 GMT</pubDate>
      <guid isPermaLink="false">http://www.onthemedia.org/episodes/2010/12/10/segments/158617</guid>
      <itunes:explicit>No</itunes:explicit>
    <author>[email protected] (WNYC, New York Public Radio)</author><feedburner:origLink>http://www.onthemedia.org/episodes/2010/12/10/segments/158617</feedburner:origLink></item>
Reply
#10
i quick fix you problems. now a "broken" link down cause a full crash of the plugin. But now error-detection is hard. I will seek to find a proper way to inform the user how to fix occurring errors...

for you special problem with npr i added a workaround. the addon trys to get the medialink from the feed. If that fails it seeks for a link-item load the page and seek for link with an media ending...

it's a hot fix, so i don't put it to the upstream now, if you want to test it here is the download: http://xbmc.raptor2101.de/plugin.audio.p...0.0.91.zip
Reply
#11
Raptor 2101 Wrote:i quick fix you problems. now a "broken" link down cause a full crash of the plugin. But now error-detection is hard. I will seek to find a proper way to inform the user how to fix occurring errors...

for you special problem with npr i added a workaround. the addon trys to get the medialink from the feed. If that fails it seeks for a link-item load the page and seek for link with an media ending...

it's a hot fix, so i don't put it to the upstream now, if you want to test it here is the download: http://xbmc.raptor2101.de/plugin.audio.p...0.0.91.zip

Thanks, that seems to work, at least I can now download and play segments from On the Media from NPR. Where does it save the downloaded files, by the way? Does it download-on-the-fly as you play it, or does it download all podcasts at the time you enter? If so, that could be a lot of data for the default NPR OPML which has 100s of feeds.
Reply
#12
Also, "Album info" doesn't seem to work (i.e. display information on that podcast), it just restarts the individual podcast.
Reply
#13
Also it would be nice:
  • onscreen information in fullscreen mode would use the title information from the podcast, e.g. "December 17 podcast" for the title and "On the Media NPR/WNYC" for the album. Also the date of the podcast could be used (some skins display that in fullscreen mode).
  • display the logo for the individual podcast feed in the thumbnail

But it's great that it's working and thanks for making the plugin! It was a feature that XBMC was definitely lacking. Now all I need is the MythTV PVR addon (which is in the works).
Reply
#14
Another problematic feed, not sure what the problem is in this case:

Code:
<outline
                                text=""
                                title=""
                                type="rss"
                                version="RSS"
                                imageHref=""
                                description="From Scratch reviews the entrepreneurial life with leading pioneers from the business world, the social sector, entertainment, and the arts. From Scratch personalizes the lives of entrepreneurs by providing listeners with a candid, first-hand view of the launching process."
                                typicalDurationMins=""
                                orgId="1"
                                topicId="1006"
                                orgName="National Public Radio"
                                topicName="Business"
                                xmlUrl="http://www.npr.org/templates/rss/podcast.php?id=126166186"
                                htmlUrl=""
                        />

This is the traceback:

Code:
ERROR: Traceback (most recent call last):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/default.py", line 105, in ?
                                                opmlFile.displayMenu(path);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 111, in displayMenu
                                                self.opmlFolder.displayMenu(path);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 49, in displayMenu
                                                self.gui.buildMenuEntry(element);
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/simplexbmc.py", line 80, in buildMenuEntry
                                                if(menuElement.hasUnreadItems()):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/opml.py", line 83, in hasUnreadItems
                                                if(element.hasUnreadItems()):
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/__init__.py", line 90, in hasUnreadItems
                                                self.loadFeed();
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/__init__.py", line 98, in loadFeed
                                                self.updateFeed();
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/rss.py", line 68, in updateFeed
                                                feedItem.link = self.parseIndirectItem(self.readText(itemNode,"link"));
                                              File "/home/myth/.xbmc/addons/plugin.audio.podcatcher/feedreader/__init__.py", line 210, in parseIndirectItem
                                                link = regex_mediaLink.search(htmlPage).group();
                                            AttributeError: 'NoneType' object has no attribute 'group'
Reply
#15
Raptor 2101 Wrote:But now error-detection is hard. I will seek to find a proper way to inform the user how to fix occurring errors...[/url]

Couldn't you just add an Exception clause to "skip" any feed that doesn't parse, and go to the next one as a workaround? That would enable at least the loading of feeds that did work, even if it didn't warn the user about the ones that didn't load. It's better than the whole plugin crashing.
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 10

Logout Mark Read Team Forum Stats Members Help
[RELEASE] PodCatching Addon1