Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Missing content_type
#1
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.
Reply
#2
You can open guisettings.xml, and edit command manually. This is a easy solution.
------------------------------------------------------

Want to know more about the skin? Liked my work and want contribute?
Visit my website
XBMC Brazilian Community Forum
By making a donation, please do not post in the forum, send me an email or PM, thank you.
Reply
#3
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>
Reply
#4
There's another way. I simply changed the script for:

content_type = plugin.request.args.get('content_type',None)
Reply
#5
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
My GitHub. My Add-ons:
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Missing content_type0