Kodi Community Forum
Missing content_type - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67)
+---- Forum: Skin Archive (https://forum.kodi.tv/forumdisplay.php?fid=179)
+----- Forum: Ace 2 (https://forum.kodi.tv/forumdisplay.php?fid=190)
+----- Thread: Missing content_type (/showthread.php?tid=159808)



Missing content_type - Funnychick - 2013-03-19

Hi all,

great skin! My absolut favourite. Nevertheless I encounter the following problem. Calling for example the plugin video_podcast works from the standard XBMC addon menu:

Code:
DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin Apple iTunes Podcasts('plugin://plugin.video.itunes_podcasts/','2','?content_type=audio')

When adding this call to the main menu or "my menu" the call is changed to the following leaving out the content_type info:
Code:
DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin Apple iTunes Podcasts('plugin://plugin.video.itunes_podcasts/','3','')

Thus this results in the problem that the content type (needed by some plugins) is not correctly initialized. Error message:
Code:
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: 'content_type'
                                            Traceback (most recent call last):
                                              File "X:\_XBMC\portable_data\addons\plugin.video.itunes_podcasts\addon.py", line 303, in <module>
                                                plugin.run()
                                              File "X:\_XBMC\portable_data\addons\script.module.xbmcswift2\lib\xbmcswift2\plugin.py", line 332, in run
                                                items = self._dispatch(self.request.path)
                                              File "X:\_XBMC\portable_data\addons\script.module.xbmcswift2\lib\xbmcswift2\plugin.py", line 306, in _dispatch
                                                listitems = view_func(**items)
                                              File "X:\_XBMC\portable_data\addons\plugin.video.itunes_podcasts\addon.py", line 44, in show_root
                                                content_type = plugin.request.args['content_type']
                                            KeyError: 'content_type'
                                            -->End of Python script error report<--
Is there any possibility to hand over the content_type information from a call within the skin? Same problem also applies to Aeon MQ4.


RE: Missing content_type - MarcosQui - 2013-03-21

You can open guisettings.xml, and edit command manually. This is a easy solution.


RE: Missing content_type - Funnychick - 2013-03-21

Thank you for your answer. How do I have to change the entry? It looks like this:
Code:
<setting type="string" name="skin.ace.subaddon4.label">AUDIO PODCAST</setting>
        <setting type="string" name="skin.ace.subaddon4.path">plugin.video.itunes_podcasts</setting>
        <setting type="string" name="skin.ace.subaddon4.property">mymenu1</setting>
        <setting type="string" name="skin.ace.subaddon4.submenu">on</setting>



RE: Missing content_type - Funnychick - 2013-03-21

There's another way. I simply changed the script for:

content_type = plugin.request.args.get('content_type',None)


RE: Missing content_type - sphere - 2013-03-21

Hi,

yes, "multi content" add-ons need* to know the content-type (video, music, picture) from which they got started. But I didn't know that some official(?) skins do such "direct calling" things Smile

I will include a workaround in my multi-content add-ons anyway.

regards,
sphere