summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-11-19 22:44:24 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-11-19 22:44:24 +0100
commit3b9885e40961bde996014c7e82d59daf2bd7ac14 (patch)
tree54f60f42b9b445d8b497d373a9d16eefd262ce87 /module/Api.py
parentcatch real debrid error, when ip is blocked (diff)
downloadpyload-3b9885e40961bde996014c7e82d59daf2bd7ac14.tar.xz
disableble thriftbackend
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/module/Api.py b/module/Api.py
index 11072b2cd..ba79a31ef 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -22,14 +22,18 @@ from os.path import join
from time import time
import re
-from remote.thriftbackend.thriftgen.pyload.ttypes import *
-from remote.thriftbackend.thriftgen.pyload.Pyload import Iface
-
from PyFile import PyFile
from utils import freeSpace, compare_time
from common.packagetools import parseNames
from network.RequestFactory import getURL
-
+from remote import activated
+
+if activated:
+ from remote.thriftbackend.thriftgen.pyload.ttypes import *
+ from remote.thriftbackend.thriftgen.pyload.Pyload import Iface
+ BaseObject = TBase
+else:
+ from remote.socketbackend.ttypes import *
# contains function names mapped to their permissions
# unlisted functions are for admins only