forked from djcode/Kodi-rTorrent-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.py
More file actions
59 lines (54 loc) · 1.04 KB
/
default.py
File metadata and controls
59 lines (54 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# main imports
import urllib
#extra imports
from resources.lib.functions import *
params=get_params()
url=None
hash=None
mode=None
numfiles=None
method=None
arg1=None
arg2=None
arg3=None
test=False
try:
hash=str(params["hash"])
except:
pass
try:
mode=str(params["mode"])
except:
pass
try:
numfiles=int(params["numfiles"])
except:
pass
try:
method=str(urllib.unquote_plus(params["method"]))
except:
pass
try:
arg1=str(urllib.unquote_plus(params["arg1"]))
except:
pass
try:
arg2=str(urllib.unquote_plus(params["arg2"]))
except:
pass
try:
arg3=str(urllib.unquote_plus(params["arg3"]))
except:
pass
if mode==None:
import resources.lib.mode_main as loader
loader.main()
elif mode=='files':
import resources.lib.mode_files as loader
loader.main(hash,numfiles)
elif mode=='action':
import resources.lib.mode_action as loader
loader.main(method,arg1,arg2,arg3)
elif mode=='play':
import resources.lib.mode_play as loader
loader.main(hash,arg1)