diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-08-30 03:56:36 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-08-30 03:56:36 +0200 |
commit | 52d98c2a09f2fc45caf5c5db595e1cab79b6746b (patch) | |
tree | a66bfa9bca97f741a9c9ad3abcb8f9fad2ae76ee /module | |
parent | Fix https://github.com/pyload/pyload/issues/1793 (diff) | |
parent | Update Hoster.py (diff) | |
download | pyload-52d98c2a09f2fc45caf5c5db595e1cab79b6746b.tar.xz |
Merge pull request #1796 from GammaC0de/patch-8
[Hoster] fix pyfile.name not updated if disposition
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/internal/Hoster.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py index b397a92a6..924672acf 100644 --- a/module/plugins/internal/Hoster.py +++ b/module/plugins/internal/Hoster.py @@ -44,7 +44,7 @@ def create_getInfo(klass): class Hoster(Plugin): __name__ = "Hoster" __type__ = "hoster" - __version__ = "0.20" + __version__ = "0.21" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -412,7 +412,7 @@ class Hoster(Plugin): if disposition and newname: finalname = urlparse.urlparse(newname).path.split('/')[-1].split(' filename*=')[0] - if finalname != newname != self.pyfile.name: + if finalname != newname: try: os.rename(fs_join(location, newname), fs_join(location, finalname)) @@ -421,8 +421,9 @@ class Hoster(Plugin): finalname = newname self.log_info(_("`%s` saved as `%s`") % (self.pyfile.name, finalname)) - self.pyfile.name = finalname - filename = os.path.join(location, finalname) + + self.pyfile.name = finalname + filename = os.path.join(location, finalname) self.set_permissions(fs_encode(filename)) |