youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 6b445558ffe292c11327862ab510b1abf4e36616
parent 6bf6962062ff674013d8651e190998b506c681e5
Author: Philipp Hagemeister <phihag@phihag.de>
Date:   Thu, 23 Oct 2014 00:44:21 +0200

[youtube] Only set language when necessary

We only need to set the language when we are using a login; otherwise it will always be English.

Diffstat:
Myoutube_dl/extractor/youtube.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py @@ -191,8 +191,9 @@ class YoutubeBaseInfoExtractor(InfoExtractor): def _real_initialize(self): if self._downloader is None: return - if not self._set_language(): - return + if self._get_login_info()[0] is not None: + if not self._set_language(): + return if not self._login(): return self._confirm_age()