aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/livestreamer/plugins/youtube.py
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-08-23 22:46:06 +0200
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-08-23 22:46:06 +0200
commit84a935a1d475dee021402e5fb74c645ea43709d0 (patch)
treea629f40635c749d8b40a111639cb076aad60c157 /src/livestreamer/plugins/youtube.py
parent27cb39360357e41bfaa8a5667708898294e5127d (diff)
Make the library more thread safe.
Diffstat (limited to 'src/livestreamer/plugins/youtube.py')
-rw-r--r--src/livestreamer/plugins/youtube.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/livestreamer/plugins/youtube.py b/src/livestreamer/plugins/youtube.py
index 398657c..606a57e 100644
--- a/src/livestreamer/plugins/youtube.py
+++ b/src/livestreamer/plugins/youtube.py
@@ -1,5 +1,5 @@
from livestreamer.compat import str, bytes, parse_qs
-from livestreamer.plugins import Plugin, PluginError, NoStreamsError, register_plugin
+from livestreamer.plugins import Plugin, PluginError, NoStreamsError
from livestreamer.stream import HTTPStream
from livestreamer.utils import urlget, verifyjson
@@ -76,7 +76,7 @@ class Youtube(Plugin):
if not "url" in streaminfo:
continue
- stream = HTTPStream(streaminfo["url"][0])
+ stream = HTTPStream(self.session, streaminfo["url"][0])
if streaminfo["itag"][0] in formatmap:
quality = formatmap[streaminfo["itag"][0]]
@@ -87,4 +87,4 @@ class Youtube(Plugin):
return streams
-register_plugin("youtube", Youtube)
+__plugin__ = Youtube