summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-03-20 00:10:28 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-03-20 00:10:28 +0100
commitfa8727d27172ffe5d1f5d16f243a1e9c23a03100 (patch)
tree1e8b31d31df2c9082376496a1c40f497bde852c4 /module
parentcore ssl fix, nginx support, https for lighttpd and nginx (diff)
downloadpyload-fa8727d27172ffe5d1f5d16f243a1e9c23a03100.tar.xz
fixed #86
Diffstat (limited to 'module')
-rw-r--r--module/gui/Collector.py2
-rwxr-xr-xmodule/network/Request.py44
-rw-r--r--module/plugins/hoster/RapidshareCom.py3
3 files changed, 34 insertions, 15 deletions
diff --git a/module/gui/Collector.py b/module/gui/Collector.py
index 6ec0977d6..6fce9d49e 100644
--- a/module/gui/Collector.py
+++ b/module/gui/Collector.py
@@ -173,7 +173,7 @@ class PackageCollector(QObject):
item = newChild
item.setData(0, Qt.DisplayRole, QVariant(item.getFileData()["filename"]))
item.setData(0, Qt.UserRole, QVariant(cid))
- item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
+ item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled | Qt.ItemIsDragEnabled)
def setPackData(self, data):
self._data = data
diff --git a/module/network/Request.py b/module/network/Request.py
index b47ef4206..22779db6f 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -1,10 +1,25 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-
-
"""
-authored by: RaNaN, Spoob
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: spoob
+ @author: RaNaN
+ @author: mkaay
+ @version: v0.3.2
"""
+
import base64
import cookielib
from gzip import GzipFile
@@ -20,16 +35,6 @@ except:
import urllib2
from Keepalive import HTTPHandler
-
-"""
- handles all outgoing HTTP-Requests of the Server
- Usage: create Request Instance
- use retrieveURL and call it with a url at least
- additionaly you can firstly pass the get and secondly the post data in form of a dictonary
- when the last argument is true the handler simulate a http referer with the last called url.
- retrieveUrl returns response as string
-
-"""
class AbortDownload(Exception):
pass
@@ -475,6 +480,19 @@ class Request:
file_name = temp_name
return file_name
+def getURL(url):
+ """
+ currently used for update check
+ """
+ req = Request()
+ c = req.load(url)
+ if req.curl:
+ try:
+ req.pycurl.close()
+ except:
+ pass
+ return c
+
if __name__ == "__main__":
import doctest
doctest.testmod()
diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py
index 840f62268..be563ef07 100644
--- a/module/plugins/hoster/RapidshareCom.py
+++ b/module/plugins/hoster/RapidshareCom.py
@@ -117,7 +117,8 @@ class RapidshareCom(Plugin):
premkbleft = int(fields[18].split("=")[1])
if premkbleft < int(self.api_data["size"][0:-3]):
self.logger.info(_("Rapidshare: Not enough traffic left"))
- self.config["premium"] = False
+ #self.config["premium"] = False
+ self.props["premkbleft"] = 0
else:
self.props["premkbleft"] = premkbleft