From f417ec942bab9ac3999a71808b8a0a1c09fb1037 Mon Sep 17 00:00:00 2001
From: RaNaN <Mast3rRaNaN@hotmail.de>
Date: Tue, 31 May 2011 22:18:50 +0200
Subject: no autodecode , it may break some plugins

---
 module/plugins/Plugin.py            | 4 ++--
 module/plugins/hoster/YoutubeCom.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'module/plugins')

diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index b27b99170..d8bd3bcd0 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -306,8 +306,8 @@ class Plugin(object):
         res = self.req.load(url, get, post, ref, cookies, just_header)
 
         if utf8:
-            #@TODO parse header and decode automatically when needed
-            res = decode(res)
+            res = self.req.http.decodeResponse(res)
+            #res = decode(res)
 
         if self.core.debug:
             from inspect import currentframe
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 8f8098efb..34f0fa5de 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -16,7 +16,7 @@ class YoutubeCom(Hoster):
     __author_mail__ = ("spoob@pyload.org")
    
     def process(self, pyfile):
-        html = self.load(pyfile.url)
+        html = self.load(pyfile.url, utf8=True)
 
         if re.search(r"(.*eine fehlerhafte Video-ID\.)", html) is not None:
             self.offline()
@@ -34,7 +34,7 @@ class YoutubeCom(Hoster):
         if self.getConf("quality") == "hd" or self.getConf("quality") == "hq":
             file_suffix = ".mp4"
 
-        name = (re.search(file_name_pattern, html).group(1).replace("/", "") + file_suffix).decode("utf8")
+        name = (re.search(file_name_pattern, html).group(1).replace("/", "") + file_suffix)
         pyfile.name = name #.replace("&amp;", "&").replace("ö", "oe").replace("ä", "ae").replace("ü", "ue")       
 
         file_url = ""
-- 
cgit v1.2.3