summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/SimpleCrypter.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-02 15:46:46 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-02 15:46:46 +0100
commit8d1231901b3ccccdc2d3d2593c0baf4ff7be4220 (patch)
treeddb5c484c01d4fa890c7aa678280502d7f48da00 /module/plugins/internal/SimpleCrypter.py
parent[SimpleHoster] Fix _isDirectLink (diff)
downloadpyload-8d1231901b3ccccdc2d3d2593c0baf4ff7be4220.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/internal/SimpleCrypter.py')
-rw-r--r--module/plugins/internal/SimpleCrypter.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index c83ee8a78..bfc473801 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -125,13 +125,17 @@ class SimpleCrypter(Crypter, SimpleHoster):
self.info.update(self.getInfo(self.pyfile.url, self.html))
self.logDebug("File info (AFTER): %s" % self.info)
- name = self.info['name']
- url = self.info['url']
+ try:
+ name = self.info['name']
+ url = self.info['url']
+
+ if name and name != url:
+ self.pyfile.name = name
+ else:
+ self.pyfile.name = self.info['name'] = urlparse(name).path.split('/')[-1]
- if name and name != url:
- self.pyfile.name = name
- else:
- self.pyfile.name = self.info['name'] = urlparse(name).path.split('/')[-1]
+ except Exception:
+ pass
folder = self.info['folder'] = self.pyfile.name