From 834a315649a0090812118f34618e48aff160c162 Mon Sep 17 00:00:00 2001 From: Ivo Buff Date: Fri, 12 Jul 2013 00:45:36 +0200 Subject: SimplydebridCOM plugin added SimplydebridCOM plugin added --- module/plugins/hooks/SimplydebridCOM.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 module/plugins/hooks/SimplydebridCOM.py (limited to 'module/plugins/hooks') diff --git a/module/plugins/hooks/SimplydebridCOM.py b/module/plugins/hooks/SimplydebridCOM.py new file mode 100644 index 000000000..af415db23 --- /dev/null +++ b/module/plugins/hooks/SimplydebridCOM.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +from module.network.RequestFactory import getURL +from module.plugins.internal.MultiHoster import MultiHoster + +class SimplydebridCOM(MultiHoster): + __name__ = "SimplydebridCOM" + __version__ = "0.01" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", "False"),("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),("hosterList", "str", "Hoster list (comma separated)", "")] + __description__ = """Simply-Debrid.com hook plugin""" + __author_name__ = ("Kagenoshin") + __author_mail__ = ("kagenoshin@gmx.ch") + + def getHoster(self): + page = getURL("http://simply-debrid.com/api.php?list=1") + if(page[len(page)-1] == ";"): #remove ; if the page entry ends with ; + page = page[0:len(page)-1] + return [x.strip() for x in page.replace("\"","").split(";")] \ No newline at end of file -- cgit v1.2.3 From 88f6fcac584da7e822d9ac4084553972c521f044 Mon Sep 17 00:00:00 2001 From: Ivo Buff Date: Fri, 12 Jul 2013 11:28:40 +0200 Subject: Cleanup Some cleanup and changed tabs to 4 spaces --- module/plugins/hooks/SimplydebridCOM.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'module/plugins/hooks') diff --git a/module/plugins/hooks/SimplydebridCOM.py b/module/plugins/hooks/SimplydebridCOM.py index af415db23..79083f724 100644 --- a/module/plugins/hooks/SimplydebridCOM.py +++ b/module/plugins/hooks/SimplydebridCOM.py @@ -4,16 +4,16 @@ from module.network.RequestFactory import getURL from module.plugins.internal.MultiHoster import MultiHoster class SimplydebridCOM(MultiHoster): - __name__ = "SimplydebridCOM" - __version__ = "0.01" - __type__ = "hook" - __config__ = [("activated", "bool", "Activated", "False"),("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),("hosterList", "str", "Hoster list (comma separated)", "")] - __description__ = """Simply-Debrid.com hook plugin""" - __author_name__ = ("Kagenoshin") - __author_mail__ = ("kagenoshin@gmx.ch") + __name__ = "SimplydebridCOM" + __version__ = "0.01" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", "False"),("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),("hosterList", "str", "Hoster list (comma separated)", "")] + __description__ = """Simply-Debrid.com hook plugin""" + __author_name__ = ("Kagenoshin") + __author_mail__ = ("kagenoshin@gmx.ch") - def getHoster(self): - page = getURL("http://simply-debrid.com/api.php?list=1") - if(page[len(page)-1] == ";"): #remove ; if the page entry ends with ; - page = page[0:len(page)-1] - return [x.strip() for x in page.replace("\"","").split(";")] \ No newline at end of file + def getHoster(self): + page = getURL("http://simply-debrid.com/api.php?list=1") + if(page[len(page)-1] == ";"): #remove ; if the page entry ends with ; + page = page[0:len(page)-1] + return [x.strip() for x in page.replace("\"","").split(";")] \ No newline at end of file -- cgit v1.2.3 From abac8315248b6a72b0b4906548d9372f459cdd2e Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 20 Jul 2013 18:14:08 +0200 Subject: Code optimized --- module/plugins/hooks/SimplydebridCOM.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hooks') diff --git a/module/plugins/hooks/SimplydebridCOM.py b/module/plugins/hooks/SimplydebridCOM.py index 79083f724..721dce6ca 100644 --- a/module/plugins/hooks/SimplydebridCOM.py +++ b/module/plugins/hooks/SimplydebridCOM.py @@ -7,13 +7,13 @@ class SimplydebridCOM(MultiHoster): __name__ = "SimplydebridCOM" __version__ = "0.01" __type__ = "hook" - __config__ = [("activated", "bool", "Activated", "False"),("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),("hosterList", "str", "Hoster list (comma separated)", "")] + __config__ = [("activated", "bool", "Activated", "False"), + ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("hosterList", "str", "Hoster list (comma separated)", "")] __description__ = """Simply-Debrid.com hook plugin""" __author_name__ = ("Kagenoshin") __author_mail__ = ("kagenoshin@gmx.ch") def getHoster(self): page = getURL("http://simply-debrid.com/api.php?list=1") - if(page[len(page)-1] == ";"): #remove ; if the page entry ends with ; - page = page[0:len(page)-1] - return [x.strip() for x in page.replace("\"","").split(";")] \ No newline at end of file + return [x.strip() for x in page.rstrip(';').replace("\"","").split(";")] -- cgit v1.2.3 From 3964f4231fa5ff68b07a50d23d3b233a0735612d Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 20 Jul 2013 20:35:18 +0200 Subject: Simplydebrid: fixed syntax error + code reformatted + removed unused imports --- module/plugins/hooks/SimplydebridCOM.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/hooks') diff --git a/module/plugins/hooks/SimplydebridCOM.py b/module/plugins/hooks/SimplydebridCOM.py index 721dce6ca..b45d289ee 100644 --- a/module/plugins/hooks/SimplydebridCOM.py +++ b/module/plugins/hooks/SimplydebridCOM.py @@ -3,6 +3,7 @@ from module.network.RequestFactory import getURL from module.plugins.internal.MultiHoster import MultiHoster + class SimplydebridCOM(MultiHoster): __name__ = "SimplydebridCOM" __version__ = "0.01" @@ -16,4 +17,4 @@ class SimplydebridCOM(MultiHoster): def getHoster(self): page = getURL("http://simply-debrid.com/api.php?list=1") - return [x.strip() for x in page.rstrip(';').replace("\"","").split(";")] + return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")] -- cgit v1.2.3 From 4d6f805c40f48cda9c57bc2e4a8f09bc37e046ec Mon Sep 17 00:00:00 2001 From: Stefano Date: Sat, 20 Jul 2013 20:43:35 +0200 Subject: Simplydebrid: renamed to standard --- module/plugins/hooks/SimplydebridCOM.py | 20 -------------------- module/plugins/hooks/SimplydebridCom.py | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) delete mode 100644 module/plugins/hooks/SimplydebridCOM.py create mode 100644 module/plugins/hooks/SimplydebridCom.py (limited to 'module/plugins/hooks') diff --git a/module/plugins/hooks/SimplydebridCOM.py b/module/plugins/hooks/SimplydebridCOM.py deleted file mode 100644 index b45d289ee..000000000 --- a/module/plugins/hooks/SimplydebridCOM.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.network.RequestFactory import getURL -from module.plugins.internal.MultiHoster import MultiHoster - - -class SimplydebridCOM(MultiHoster): - __name__ = "SimplydebridCOM" - __version__ = "0.01" - __type__ = "hook" - __config__ = [("activated", "bool", "Activated", "False"), - ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), - ("hosterList", "str", "Hoster list (comma separated)", "")] - __description__ = """Simply-Debrid.com hook plugin""" - __author_name__ = ("Kagenoshin") - __author_mail__ = ("kagenoshin@gmx.ch") - - def getHoster(self): - page = getURL("http://simply-debrid.com/api.php?list=1") - return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")] diff --git a/module/plugins/hooks/SimplydebridCom.py b/module/plugins/hooks/SimplydebridCom.py new file mode 100644 index 000000000..3272df567 --- /dev/null +++ b/module/plugins/hooks/SimplydebridCom.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- + +from module.network.RequestFactory import getURL +from module.plugins.internal.MultiHoster import MultiHoster + + +class SimplydebridCom(MultiHoster): + __name__ = "SimplydebridCom" + __version__ = "0.01" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", "False"), + ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), + ("hosterList", "str", "Hoster list (comma separated)", "")] + __description__ = """Simply-Debrid.com hook plugin""" + __author_name__ = ("Kagenoshin") + __author_mail__ = ("kagenoshin@gmx.ch") + + def getHoster(self): + page = getURL("http://simply-debrid.com/api.php?list=1") + return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")] -- cgit v1.2.3