summaryrefslogtreecommitdiffstats
path: root/module/FileDatabase.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2011-02-07 20:48:23 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2011-02-07 20:48:23 +0100
commit6c7725cee8f320ae8de087aaf753169f11c907f9 (patch)
tree87a1c1fed1158f44ad43734533705badd829cfc2 /module/FileDatabase.py
parentcaptchamanager fix (diff)
downloadpyload-6c7725cee8f320ae8de087aaf753169f11c907f9.tar.xz
Ev0InFetcher update (thanks to KurrKurr)
Diffstat (limited to 'module/FileDatabase.py')
-rw-r--r--module/FileDatabase.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py
index 633f210e1..20548c136 100644
--- a/module/FileDatabase.py
+++ b/module/FileDatabase.py
@@ -532,18 +532,6 @@ class FileHandler:
def restartFailed(self):
""" restart all failed links """
self.db.restartFailed()
-
- @lock
- @change
- def setStorage(self, identifier, key, value):
- self.db.setStorage(identifier, key, value)
-
- @lock
- def getStorage(self, identifier, key, default=None):
- value = self.db.getStorage(identifier, key)
- if value is None:
- return default
- return value
class FileMethods():
@style.queue
@@ -842,24 +830,6 @@ class FileMethods():
DatabaseBackend.registerSub(FileMethods)
-class StorageMethods():
- @style.queue
- def setStorage(self, identifier, key, value):
- self.c.execute("SELECT id FROM storage WHERE identifier=? AND key=?", (identifier, key))
- if self.c.fetchone() is not None:
- self.c.execute("UPDATE storage SET value=? WHERE identifier=? AND key=?", (value, identifier, key))
- else:
- self.c.execute("INSERT INTO storage (identifier, key, value) VALUES (?, ?, ?)", (identifier, key, value))
-
- @style.queue
- def getStorage(self, identifier, key):
- self.c.execute("SELECT value FROM storage WHERE identifier=? AND key=?", (identifier, key))
- row = self.c.fetchone()
- if row is not None:
- return row[0]
-
-DatabaseBackend.registerSub(StorageMethods)
-
if __name__ == "__main__":
pypath = "."