Eldorados/script.module.axel.downloader — pull request #2 by Shani-08 (2014-03-29 05:20:16+00:00)
Title: first beta

Hi Eldorado,
Here are the first beta changes. I have tried my best to keep the code readable.
controlpanel.py: This will be the display area in Scripts to Manage the downloads and status etc.
default.py: This is the service which loads the Proxy server.
lib\proxy: I have moved it to lib as it will become standard library for streaming proxy. This deal with client connections and return the stream data
lib\axel.py : This got classes like DownloadManager, Downloader and DownloadQueuedProcessor
download.py, this is not in use so should be deleted.
common.py. contain common routines.
One thing i haven't done is remove the xbmc objects, like common plugin and logging etc.This is required to make axel.py and proxy xbmc independent.

Calling mechanism.

import proxy
axelhelper = proxy.ProxyHelper()
link = axelhelper.create_proxy_url(file_link);#more parameters here
xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(link)

create_proxy_url: supports some parameters, more will be added here
def create_proxy_url(self,url,downloadmode=1,keep_file=False,connections=2):
downloadmode=1=Stream, 2 = Download
keep_file = After streaming, should the file be kept
connections: number of connections to use for download

There are going to be some bugs so need to make it rock solid. The video stop is working with a logic, we will see if that create any problems otherwise we go back to stop signal from player like you mention.

Thanks