diff options
| author | 2014-07-16 00:46:26 +0200 | |
|---|---|---|
| committer | 2014-07-16 00:46:26 +0200 | |
| commit | a1e78f33dc2b0b6777fdcbc415673f3965b25542 (patch) | |
| tree | 4f2f0c9d7592482409740be8647f8f6849d30681 /module/plugins/hoster | |
| parent | [StealthTo] Mark dead (diff) | |
| download | pyload-a1e78f33dc2b0b6777fdcbc415673f3965b25542.tar.xz | |
Prefer self.urls and self.packages for adding links
Diffstat (limited to 'module/plugins/hoster')
| -rw-r--r-- | module/plugins/hoster/Ftp.py | 5 | 
1 files changed, 2 insertions, 3 deletions
diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py index 725126d17..f448b99d1 100644 --- a/module/plugins/hoster/Ftp.py +++ b/module/plugins/hoster/Ftp.py @@ -75,13 +75,12 @@ class Ftp(Hoster):              #Naive ftp directory listing                        if re.search(r'^25\d.*?"', self.req.http.header, re.M):                  pyfile.url = pyfile.url.rstrip('/') -                pkgname = "/".join((pyfile.package().name, urlparse(pyfile.url).path.rpartition('/')[2])) +                pkgname = "/".join(pyfile.package().name, urlparse(pyfile.url).path.rpartition('/')[2])                  pyfile.url += '/'                  self.req.http.c.setopt(48, 1)  # CURLOPT_DIRLISTONLY                  response = self.load(pyfile.url, decode=False)                  links = [pyfile.url + quote(x) for x in response.splitlines()]                  self.logDebug("LINKS", links) -                self.core.api.addPackage(pkgname, links, 1) -                #self.core.files.addLinks(links, pyfile.package().id) +                self.core.api.addPackage(pkgname, links)              else:                  self.fail("Unexpected server response")  | 
