Unicode action in addContextMenuItems() method
#1
Hi,

It will be practical if this parameter is not restricted to be a string (as is the url parameter in addDirectoryItem()) Nod

It works as string when i apply urllib.quote and unquote on it before and after passing it however i encountred problems under linux Sad

sfaxman...
Reply
#2
Please post a ticket on trac so that it may be addressed.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
assign it to me.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#4
rev 16957:

could you post an example that was causing issues on linux. quote and unquote should have worked fine.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
OK. Will be done.
Reply
#6
Hi,

To reproduce the urllib behavior under linux you only need to:
- Uncomment line 612 in videomonkey.py
- Comment line 613 in videomonkey.py
- Uncomment line 653 in videomonkey.py
- Comment line 654 in videomonkey.py
- Open a video site (e.g. Youtube) and browse to a page that contains a video which title includes non ascii chars (e.g. using the 'next page' icon)

The next error occurs:

Code:
17:43:06 T:2908744592 M: 62230528  NOTICE: Traceback (most recent call last):
17:43:06 T:2908744592 M: 62230528  NOTICE:   File "/home/sfaxman/.xbmc/plugins/video/VideoMonkey/videomonkey.py", line 1637, in run
17:43:06 T:2908744592 M: 62230528  NOTICE:     if self.parseView(currentView) == 0:
17:43:06 T:2908744592 M: 62230528  NOTICE:   File "/home/sfaxman/.xbmc/plugins/video/VideoMonkey/videomonkey.py", line 1514, in parseView
17:43:06 T:2908744592 M: 62230528  NOTICE:     self.addListItem(m_title, self.currentlist.codeUrl(m, 'videomonkey'), m_icon, len(self.currentlist.items), m)
17:43:06 T:2908744592 M: 62230528  NOTICE:   File "/home/sfaxman/.xbmc/plugins/video/VideoMonkey/videomonkey.py", line 612, in codeUrl
17:43:06 T:2908744592 M: 62230528  NOTICE:     info_value = urllib.quote(item.infos_values[info_idx])
17:43:06 T:2908744592 M: 62230528  NOTICE:   File "../Python/Lib/urllib.py", line 1117, in quote
17:43:06 T:2908744592 M: 62230528  NOTICE:     res = map(safe_map.__getitem__, s)
17:43:06 T:2908744592 M: 62230528  NOTICE: KeyError: u'\u660e'

Thanks for the quick implementation NodBig Grin

sfaxman...
Reply
#7
Is there any update on this?
Reply
#8
It was added to SVN already, yes.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Unicode action in addContextMenuItems() method0