projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bf6962
)
[youtube] Only set language when necessary
author
Philipp Hagemeister
<phihag@phihag.de>
Wed, 22 Oct 2014 22:44:21 +0000
(
00:44
+0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Wed, 22 Oct 2014 22:44:22 +0000
(
00:44
+0200)
We only need to set the language when we are using a login; otherwise it will always be English.
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index cfae2de8990ff7f6ae1f7ff37fdc0b559db3d290..4ab56e0ac6baf7f59f1c8892b5dbe560d96cb195 100644
(file)
--- 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()