2012-06-03, 03:10
Hi,
I have a problem with one of my add-ons:
The add-on needs to access the currently selected Item URL and the currently played Item URL.
When receiving the URL of the played Item i get the correct encoded URL:
plugin://plugin.video.test123/?url=http%3A%2F%2Fwww.test123.com%2Findex.php%3Fa%3Db%26c%3Dd%26e%3Df&mode=playVideo&a=b
But when accessing the URL of the selected Item i get a complete decoded URL:
plugin://plugin.video.test123/?url=http://www.test123.com/index.php?a=b&c=d&e=f&mode=playVideo&a=b
XBMC / the add-on cant handle the decoded URL because of the parameters.
Is this a bug? I dont know how to encode the URL correctly because only the red part must be encoded, the rest has to stay untouched.
The problem is, that I think its impossible to split the string with regex or by hand, because of the "?" and "=" in both the add-on URL and the HTTP URL.
Would be awesome if someone knows a solution.
Perhaps there is a way to get the correct encoded URL? Or anybody knows how to split this nerving string?
greetings
asde
I have a problem with one of my add-ons:
The add-on needs to access the currently selected Item URL and the currently played Item URL.
When receiving the URL of the played Item i get the correct encoded URL:
Code:
playlist[playlist.getposition()].getfilename()
But when accessing the URL of the selected Item i get a complete decoded URL:
Code:
xbmc.getInfoLabel('ListItem.FileNameAndPath')
XBMC / the add-on cant handle the decoded URL because of the parameters.
Is this a bug? I dont know how to encode the URL correctly because only the red part must be encoded, the rest has to stay untouched.
The problem is, that I think its impossible to split the string with regex or by hand, because of the "?" and "=" in both the add-on URL and the HTTP URL.
Would be awesome if someone knows a solution.
Perhaps there is a way to get the correct encoded URL? Or anybody knows how to split this nerving string?
greetings
asde