moreginger / xbmc-plugin.video.ted.talks

GNU General Public License v2.0
18 stars 20 forks source link

Make plugin work on Frodo/OpenELEC/rpi #28

Closed moreginger closed 12 years ago

moreginger commented 12 years ago

Just tried to run TED on the latest OpenELEC on rpi (OpenELEC-RPi.arm-devel-20121004053130-r12039.tar.bz2) and it blew up (see below). Probably due to changes in Frodo but could be an OpenELEC thing or even Raspberry Pi...

20:38:08 T:1275057248 ERROR: EXCEPTION: argument "iconImage" for method "XBMCAddon::xbmcgui::ListItem" must be unicode or str 20:38:09 T:1275057248 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

ted_talks.Main(args_map=args_map).run() File "/storage/.xbmc/addons/plugin.video.ted.talks/resources/lib/ted_talks.py", line 328, in run ui.showCategories() File "/storage/.xbmc/addons/plugin.video.ted.talks/resources/lib/ted_talks.py", line 103, in showCategories

self.addItem(plugin.getLS(30001), 'newTalksRss', video_info={'Plot':plugin.getLS(30031)}) File "/storage/.xbmc/addons/plugin.video.ted.talks/resources/lib/ted_talks.py", line 59, in addItem li = xbmcgui.ListItem(label=title, iconImage=img, thumbnailImage=img) TypeError: argument "iconImage" for method "XBMCAddon::xbmcgui::ListItem" must be unicode or str -->End of Python script error report<--

poluekt commented 12 years ago

When img param is set to None, it crashes the plugin. Not sure why it happens in raspberry pi. So here is what I tried: Before li = xbmcgui.ListItem(label=title, iconImage=img, thumbnailImage=img) in ted_talks.py add img=u"None"

This not a fix by any measure, but it seems to get plugin working. Note: In python indention matters, therefore new line needs to be on the same level as one after it

moreginger commented 12 years ago

Thanks poluekt. The default seems to have been changed to "", not sure if this is Frodo or Rpi, but seems to work in Eden and Rpi builds.

Fixed in 7ab91090da63c3b6362e2c6c3f44ca07e1cdb0a2

moreginger commented 12 years ago

Now merged into repo: http://sourceforge.net/mailarchive/forum.php?thread_name=CAC91U6UjLgjbaCqnxjL%2B3d9WNOVesp29YqOMkr3geXb-i0FroA%40mail.gmail.com&forum_name=xbmc-addons