summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/FastixRu.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-11-17 16:14:22 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-11-17 16:14:22 +0100
commit0b27b9690f626fff0f494b32093be5736c2d1b6b (patch)
treeedbe6c49c95c9fd3f1982048e7f5a1dad49937d2 /pyload/plugins/hoster/FastixRu.py
parentfixed the plugin parser to handle multi line statements (diff)
parentMerge pull request #394 from vuolter/s/hoster/Keep2shareCC (diff)
downloadpyload-0b27b9690f626fff0f494b32093be5736c2d1b6b.tar.xz
Merge remote-tracking branch 'origin/stable'
Conflicts: module/config/default.conf module/plugins/accounts/DdlstorageCom.py module/plugins/accounts/RealdebridCom.py module/plugins/accounts/UploadheroCom.py module/plugins/crypter/DownloadVimeoCom.py module/plugins/crypter/FilebeerInfoFolder.py module/plugins/crypter/Movie2kTo.py module/plugins/hooks/AlldebridCom.py module/plugins/hooks/DebridItaliaCom.py module/plugins/hooks/MultishareCz.py module/plugins/hooks/Premium4Me.py module/plugins/hooks/PremiumizeMe.py module/plugins/hooks/RealdebridCom.py module/plugins/hooks/XFileSharingPro.py module/plugins/hooks/ZeveraCom.py module/plugins/hoster/ChipDe.py module/plugins/hoster/DdlstorageCom.py module/plugins/hoster/MovReelCom.py module/plugins/hoster/RyushareCom.py module/plugins/hoster/ShareRapidCom.py module/plugins/hoster/SpeedLoadOrg.py module/plugins/hoster/ZeveraCom.py module/web/media/default/css/default.css module/web/media/default/css/window.css module/web/templates/default/base.html module/web/templates/default/captcha.html module/web/templates/default/home.html module/web/templates/default/queue.html module/web/templates/default/window.html pyload/plugins/accounts/AlldebridCom.py pyload/plugins/accounts/Http.py pyload/plugins/accounts/MultishareCz.py pyload/plugins/accounts/Premium4Me.py pyload/plugins/accounts/PremiumizeMe.py pyload/plugins/accounts/ZeveraCom.py pyload/plugins/addons/Captcha9kw.py pyload/plugins/addons/CaptchaTrader.py pyload/plugins/addons/ClickAndLoad.py pyload/plugins/addons/Ev0InFetcher.py pyload/plugins/addons/ExternalScripts.py pyload/plugins/addons/ExtractArchive.py pyload/plugins/addons/HotFolder.py pyload/plugins/addons/MergeFiles.py pyload/plugins/addons/MultiHome.py pyload/plugins/addons/XMPPInterface.py pyload/plugins/crypter/C1neonCom.py pyload/plugins/crypter/CryptItCom.py pyload/plugins/crypter/ILoadTo.py pyload/plugins/crypter/LofCc.py pyload/plugins/crypter/NCryptIn.py pyload/plugins/crypter/OronComFolder.py pyload/plugins/crypter/RSLayerCom.py pyload/plugins/crypter/SecuredIn.py pyload/plugins/crypter/TrailerzoneInfo.py pyload/plugins/crypter/WiiReloadedOrg.py pyload/plugins/hoster/AlldebridCom.py pyload/plugins/hoster/BasePlugin.py pyload/plugins/hoster/CzshareCom.py pyload/plugins/hoster/DepositfilesCom.py pyload/plugins/hoster/EgoFilesCom.py pyload/plugins/hoster/FastshareCz.py pyload/plugins/hoster/FreakshareCom.py pyload/plugins/hoster/MegasharesCom.py pyload/plugins/hoster/MultishareCz.py pyload/plugins/hoster/MyvideoDe.py pyload/plugins/hoster/NetloadIn.py pyload/plugins/hoster/NovafileCom.py pyload/plugins/hoster/NowDownloadEu.py pyload/plugins/hoster/PornhostCom.py pyload/plugins/hoster/Premium4Me.py pyload/plugins/hoster/PremiumizeMe.py pyload/plugins/hoster/PutlockerCom.py pyload/plugins/hoster/RapidshareCom.py pyload/plugins/hoster/RealdebridCom.py pyload/plugins/hoster/ShareplaceCom.py pyload/plugins/hoster/TusfilesNet.py pyload/plugins/hoster/UnrestrictLi.py pyload/plugins/hoster/UploadedTo.py pyload/plugins/hoster/WebshareCz.py pyload/plugins/hoster/X7To.py pyload/plugins/hoster/XHamsterCom.py pyload/plugins/hoster/YoupornCom.py pyload/plugins/hoster/YourfilesTo.py pyload/plugins/hoster/YoutubeCom.py pyload/plugins/hoster/ZippyshareCom.py pyload/plugins/internal/SimpleCrypter.py pyload/plugins/internal/SimpleHoster.py
Diffstat (limited to 'pyload/plugins/hoster/FastixRu.py')
-rw-r--r--pyload/plugins/hoster/FastixRu.py28
1 files changed, 12 insertions, 16 deletions
diff --git a/pyload/plugins/hoster/FastixRu.py b/pyload/plugins/hoster/FastixRu.py
index db3302579..8805081c9 100644
--- a/pyload/plugins/hoster/FastixRu.py
+++ b/pyload/plugins/hoster/FastixRu.py
@@ -3,21 +3,17 @@
import re
from urllib import unquote
from random import randrange
-from pyload.plugins.Hoster import Hoster
-from pyload.utils import json_loads
+from module.plugins.Hoster import Hoster
+from module.common.json_layer import json_loads
class FastixRu(Hoster):
__name__ = "FastixRu"
- __version__ = "0.02"
+ __version__ = "0.04"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("unloadFailing", "bool", "Revert to standard download if download fails", "False"),
- ("interval", "int", "Reload interval in hours (0 to disable)", "24")]
- __pattern__ = r"http?://.*fastix.ru\..*"
+ __pattern__ = r"http://(?:www\.)?fastix\.(ru|it)/file/(?P<ID>[a-zA-Z0-9]{24})"
__description__ = """Fastix hoster plugin"""
- __author_name__ = ("Massimo, Rosamilia")
+ __author_name__ = ("Massimo Rosamilia")
__author_mail__ = ("max@spiritix.eu")
def getFilename(self, url):
@@ -29,19 +25,18 @@ class FastixRu(Hoster):
name += "%s.tmp" % randrange(100, 999)
return name
- def init(self):
+ def setup(self):
self.chunkLimit = 3
self.resumeDownload = True
def process(self, pyfile):
- if not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "Fastix")
- self.fail("No Fastix account provided")
-
- self.logDebug("Old URL: %s" % pyfile.url)
if re.match(self.__pattern__, pyfile.url):
new_url = pyfile.url
+ elif not self.account:
+ self.logError(_("Please enter your %s account or deactivate this plugin") % "Fastix")
+ self.fail("No Fastix account provided")
else:
+ self.logDebug("Old URL: %s" % pyfile.url)
api_key = self.account.getAccountData(self.user)
api_key = api_key["api"]
url = "http://fastix.ru/api_v2/?apikey=%s&sub=getdirectlink&link=%s" % (api_key, pyfile.url)
@@ -53,7 +48,8 @@ class FastixRu(Hoster):
else:
new_url = data["downloadlink"]
- self.logDebug("New URL: %s" % new_url)
+ if new_url != pyfile.url:
+ self.logDebug("New URL: %s" % new_url)
if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"):
#only use when name wasnt already set