2016-10-30, 11:40
I developed the following code to Download a file from contextmenu:
When I start downloading I cannot control my addons anymore (e.g. browsing folder of an addon).
Is it possible to have this function running and continue browsing my addons at the same time?
Edit:
If I implement the code in an addon which uses xbmcswift2 it works, but I don't know what they made different...
plugin.video.arteplussept is an example addon where it works if you edit def download_file(vid)
Code:
progress_bar = xbmcgui.DialogProgressBG()
progress_bar.create('Download', title)
def reporthook(block_number, block_size, total_size):
if 0 == block_number & 511:
percent = (block_number * block_size * 100) / total_size
progress_bar.update(percent)
urllib.urlretrieve(video_url, filename, reporthook)
progress_bar.close()
When I start downloading I cannot control my addons anymore (e.g. browsing folder of an addon).
Is it possible to have this function running and continue browsing my addons at the same time?
Edit:
If I implement the code in an addon which uses xbmcswift2 it works, but I don't know what they made different...
plugin.video.arteplussept is an example addon where it works if you edit def download_file(vid)