summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/MultiDebridCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/MultiDebridCom.py')
-rw-r--r--module/plugins/hoster/MultiDebridCom.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/module/plugins/hoster/MultiDebridCom.py b/module/plugins/hoster/MultiDebridCom.py
deleted file mode 100644
index ca98e8a0e..000000000
--- a/module/plugins/hoster/MultiDebridCom.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# -*- coding: utf-8 -*-
-
-############################################################################
-# This program is free software: you can redistribute it and/or modify #
-# it under the terms of the GNU Affero General Public License as #
-# published by the Free Software Foundation, either version 3 of the #
-# License, or (at your option) any later version. #
-# #
-# This program is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU Affero General Public License for more details. #
-# #
-# You should have received a copy of the GNU Affero General Public License #
-# along with this program. If not, see <http://www.gnu.org/licenses/>. #
-############################################################################
-
-import re
-
-from module.plugins.Hoster import Hoster
-from module.common.json_layer import json_loads
-
-
-class MultiDebridCom(Hoster):
- __name__ = "MultiDebridCom"
- __version__ = "0.01"
- __type__ = "hoster"
- __pattern__ = r"http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/"
- __description__ = """Multi-debrid.com hoster plugin"""
- __author_name__ = ("stickell")
- __author_mail__ = ("l.stickell@yahoo.it")
-
- def init(self):
- self.chunkLimit = -1
- self.resumeDownload = True
-
- def process(self, pyfile):
- if not self.account:
- self.logError("Please enter your Multi-debrid.com account or deactivate this plugin")
- self.fail("No Multi-debrid.com account provided")
-
- self.logDebug("Original URL: %s" % pyfile.url)
- if re.match(self.__pattern__, pyfile.url):
- new_url = pyfile.url
- else:
- page = self.req.load('http://multi-debrid.com/api.php',
- get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'],
- 'link': pyfile.url})
- self.logDebug("JSON data: " + page)
- page = json_loads(page)
- if page['status'] != 'ok':
- self.fail('Unable to unrestrict link')
- new_url = page['link']
-
- self.logDebug("Unrestricted URL: " + new_url)
-
- self.download(new_url, disposition=True)