summaryrefslogtreecommitdiffstats
path: root/module/Py_Load_File.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-20 13:05:21 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-20 13:05:21 +0200
commit641cd8c63f4c3a96a9acf4d46450ab975b9c66cd (patch)
treea1bf0e74c3bde51d174bc0d154d1f88359437fbc /module/Py_Load_File.py
parentModul struktur angelegt und request klasse eingefügt (diff)
downloadpyload-641cd8c63f4c3a96a9acf4d46450ab975b9c66cd.tar.xz
Neue Request Klasse eingebunden + ein paar Status Funktionen
Diffstat (limited to 'module/Py_Load_File.py')
-rw-r--r--module/Py_Load_File.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/module/Py_Load_File.py b/module/Py_Load_File.py
new file mode 100644
index 000000000..4a15cd990
--- /dev/null
+++ b/module/Py_Load_File.py
@@ -0,0 +1,28 @@
+from download_thread import Status
+
+class PyLoadFile:
+ """ represents the url or file
+ """
+ def __init__(self, parent, plugin, url):
+ self.parent = parent
+ self.id = None
+ pluginClass = getattr(plugin, plugin.__name__)
+ self.plugin = pluginClass(self)
+ self.url = url
+ self.filename = "filename"
+ self.download_folder = ""
+ self.status = Status(self)
+
+
+ def _get_my_plugin():
+ plugins = parent.get_avail_plugins()
+
+
+ def prepareDownload(self):
+ self.status.exists = self.plugin.file_exists()
+ if self.status.exists:
+ self.status.filename = self.plugin.get_file_name()
+ self.status.waituntil = self.plugin.time_plus_wait
+ self.status.url = self.plugin.get_file_url()
+ self.status.want_reconnect = self.plugin.want_reconnect
+