[HELP REQUEST] HTTP Headers / XBMC not accepting data-range in moved links?
#1
Hello,

I am writing a plugin for XBMC and came across some annoyance.

When I add my videos to the listing, the links contained are all "301 Moved" links. Now this wouldn't be a problem... but! XBMC does not respect or read the data-range from the redirected link - however it does read the file from the new server!

This results in my plugin not being able to seek forward or backward...

Now, as solution I thought I would resolve this myself by coding it in python, so I made a small function, looking like this:

Code:
def genlink(url):
    req = urllib2.Request(url)
    req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
    response = urllib2.urlopen(req)
    realurl = response.geturl()
    response.close()
    return realurl

However, that takes 2-3 Seconds to resolve each - and the site containing over 200 videos in some folders... would take about 10 Minutes, which clearly is not acceptable for an end-user experience.

So I wonder, should I address the XBMC team to respect redirect's data-range? Or is there a better way to code the header retrieval in python?

Thanks for any input!
Reply

Logout Mark Read Team Forum Stats Members Help
[HELP REQUEST] HTTP Headers / XBMC not accepting data-range in moved links?0