Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
zilvershadow's original simplekml was already screen resolution aware and scaled itself accordingly. you may have updated an older version.
Posts: 87
Joined: Jun 2004
Reputation:
0
any idea how to disable or modify the http user-agent http header?
thanks in advance.
arjan
Posts: 87
Joined: Jun 2004
Reputation:
0
the main other kml sites do http header/user-agent checking.
it seems better send no user-agent at all.
does anyone take the challenge?
greetings,
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
add this just below the global variables, and above the first def. it'll change the urllib user-agent to be "kiss/dp500" which is what i found they actually use.
class kissurlopener(urllib.fancyurlopener):
[tab]def [underscore][underscore]init[underscore][underscore](self, *args):
[tab][tab]self.version = "kiss/dp500"
[tab][tab]urllib.fancyurlopener.[underscore][underscore]init[underscore][underscore](self, *args)
urllib._urlopener = kissurlopener();
** edit.. hmm the code got mangled, i hope u can understand this
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
that info was from a google search. someone on an icecast forum said that he started seeing user-agent "kiss/dp500" in his logs. regardless, you can use that code can be used to change the user-agent to anything you want.
Posts: 136
Joined: Oct 2003
Reputation:
0
i need to have support for rectangles and lines in python. who is willing to code that?
greets,
zilvershadow
designer of the kmlbrowser script.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
sorry... i'd love to help but thats above me. i think darkie would have to add methods to the xbmc specific stuff which wrap the directx drawing primitives.
tho you might be able to fake it out by making a gif thats a line, and one thats a square. make sure the inside space on the square is transparent.
you could then use the xbmc.controlimage to place these images on the screen where you need them... downsides would be that the line, itself, would get scaled in thickness, and you would need to make images for each color if you need multiple colors.