Merge pull request #2061 from rzhxeo/var
[youtube-dl] / youtube_dl / YoutubeDL.py
index 4910a2912bfd9c0ccfd13dbd17b20ed35baa448d..0a4dbbbd940227621b4e31a1bdc6a3508dc2b9cb 100644 (file)
@@ -164,6 +164,8 @@ class YoutubeDL(object):
 
     def __init__(self, params=None):
         """Create a FileDownloader object with the given options."""
+        if params is None:
+            params = {}
         self._ies = []
         self._ies_instances = {}
         self._pps = []
@@ -172,7 +174,7 @@ class YoutubeDL(object):
         self._num_downloads = 0
         self._screen_file = [sys.stdout, sys.stderr][params.get('logtostderr', False)]
         self._err_file = sys.stderr
-        self.params = {} if params is None else params
+        self.params = params
 
         if params.get('bidi_workaround', False):
             try:
@@ -1014,8 +1016,12 @@ class YoutubeDL(object):
     def list_formats(self, info_dict):
         def format_note(fdict):
             res = u''
+            if fdict.get('ext') in ['f4f', 'f4m']:
+                res += u'(unsupported) '
             if fdict.get('format_note') is not None:
                 res += fdict['format_note'] + u' '
+            if fdict.get('tbr') is not None:
+                res += u'%4dk ' % fdict['tbr']
             if (fdict.get('vcodec') is not None and
                     fdict.get('vcodec') != 'none'):
                 res += u'%-5s@' % fdict['vcodec']