2013-02-12, 04:21
(2013-02-05, 03:23)coolasice Wrote: which versions of xbmc are you guys using? I cant get any of the channels to load "script error", using frodo 12 final...
Looks like the script has a bug that affects Windows installations; the '\' path separator isn't escaped properly. The problem is that the replace() function is case-sensitive, and the backslash character is encoded as "%5c" (lowercase) when the script expects "%5C" (uppercase). For a quick and dirty fix, find the code below and change all occurrences of "%5C" to lowercase.
C:\Users\{your_name}\AppData\Roaming\XBMC\addons\plugin.video.free.cable\resources\lib\_common.py
Code:
class _Info:
def __init__( self, *args, **kwargs ):
print "common.args"
print kwargs
self.__dict__.update( kwargs )
exec '''args = _Info(%s)''' % (urllib.unquote_plus(sys.argv[2][1:].replace("&", ", ").replace("'","\'").replace('%5C', '%5C%5C')).replace('%A9',u'\xae').replace('%E9',u'\xe9').replace('%99',u'\u2122')»
The main problem, though, is that the code is parsing the arguments in just about the worst way imaginable. For a better fix rip out that whole section above and replace it with this:
Code:
class _Info:
def __init__(self, s):
args = urllib.unquote_plus(s).split('&')
for x in args:
(k,v) = x.split('=', 1)
setattr(self, k, v.strip('"\''))
args = _Info(sys.argv[2][1:])
The original code also tries to replace a few specific characters (such as the trademark TM character) with Unicode equivalents, but the way it's going about it won't work. I didn't bother trying to do that. To do it right I'd need a table to translate about 100 different URL encoded characters to their Unicode equivalents. If it's a problem I'll add it later.