[Release] Simple downloader

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
gargamon Offline
Junior Member
Posts: 28
Joined: Jun 2013
Reputation: 0
Post: #76
Is there any any way to set the linux file permissions when downloading media from youtube? The files I get are readable by owner and group but not globally. This makes it cumbersome to access the files later. I'm downloading to a NAS via NFS. The umask of the user that is running XBMC is 022 so should be readable globally.
find quote
JUL1EN094 Offline
Junior Member
Posts: 2
Joined: Mar 2013
Reputation: 0
Post: #77
Hi,

I implemented simple.downloader in one of my addon and it's working well Big Grin

Do you know if is it possible to send specific cookie header to the downloader ? Ever by sending this kind of url (http://.....mp4|Cookie=) or by sending it in params ?

For testing, I modified _downloadURL code to send it in params and it's working well

Code:
def _downloadURL(self, filename, item):
        self.common.log(filename)

        url = urllib2.Request(item["url"])
        if "useragent" in item:
            url.add_header("User-Agent", item["useragent"])
        else:
            url.add_header("User-Agent", self.common.USERAGENT)
        if "cookie" in item:
            if item["cookie"]!=False  :
                url.add_header("Cookie", item["cookie"])

        file = self.common.openFile(item["path_incomplete"], "wb")
        con = urllib2.urlopen(url)

Thank you
find quote
L0RE Offline
Junior Member
Posts: 5
Joined: Feb 2013
Reputation: 0
Post: #78
I Wouuld be great to extend the supported files to m3u8 Files like:

http://c.brightcove.com/services/mobile/...1791350001

Could be done with
ffmpg -i "file" outputfile. I think there al also better ways to do so
find quote
JoGoiA Offline
Junior Member
Posts: 14
Joined: Jun 2015
Reputation: 0
Post: #79
Hello !
I work on my first addon using SimpleDownloader and now, I can queued items in SimpleDownloader and download them.
They are video files (mp4 and 3gp), from an http: address :
PHP Code:
params = { "url"urlSTR"download_path"download_path "Title"videoTitle }
downloader.download(videoTitle+".mp4"params
Everything go right until I quit my addon.
When I close my custom window and activate the Home window (eg.), SimpleDownloader goes crazy.
Every download in queue stops, I've got some notification from SimpleDownloader, telling me it can't locate RTMPdump (witch I don't use...)
It throw me this in my log :

Code:
16:08:11 T:2220   ERROR: EXCEPTION: Control does not exist in window
16:08:12 T:2220   ERROR: Previous line repeats 3 times.
16:08:12 T:2220   ERROR: EXCEPTION: Unknown exception thrown from the call "clearProperty"
16:08:12 T:2220   ERROR: EXCEPTION: Control does not exist in window
16:08:12 T:2220   ERROR: Previous line repeats 3 times.
16:08:12 T:2220   ERROR: EXCEPTION: Unknown exception thrown from the call "clearProperty"
16:08:12 T:2220   ERROR: Exception in thread Thread-1:
                                            Traceback (most recent call last):
                                              File "E:\Kodi\system\python\Lib\threading.py", line 810, in __bootstrap_inner
                                                self.run()
                                              File "E:\Kodi\system\python\Lib\threading.py", line 763, in run
                                                self.__target(*self.__args, **self.__kwargs)
                                              File "C:\Users\USER\AppData\Roaming\Kodi\addons\script.module.simple.downloader\lib\Si​mpleDownloader.py", line 127, in _startDownload
                                                self._processQueue()
                                              File "C:\Users\USER\AppData\Roaming\Kodi\addons\script.module.simple.downloader\lib\Si​mpleDownloader.py", line 201, in _processQueue
                                                self.dialog.close()
                                              File "C:\Users\USER\AppData\Roaming\Kodi\addons\script.module.simple.downloader\lib\Di​alogDownloadProgress.py", line 286, in close
                                                self.removeControls()
                                              File "C:\Users\USER\AppData\Roaming\Kodi\addons\script.module.simple.downloader\lib\Di​alogDownloadProgress.py", line 270, in removeControls
                                                self.window.clearProperty("DialogDownloadProgress.Hide")
                                            RuntimeError: Unknown exception thrown from the call "clearProperty"

What did I doing wrong ?
I don't wish to stop my downloads when I quit my addon... I want them to continue while I do other things in kodi during the downloading.
While I don't quit my own window, downloading works fine.
(This post was last modified: 2015-07-02 16:28 by JoGoiA.)
find quote
Post Reply