mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	[utils] Add join_nonempty
				
					
				
			This commit is contained in:
		| @@ -13,6 +13,7 @@ from ..utils import ( | ||||
|     ExtractorError, | ||||
|     int_or_none, | ||||
|     float_or_none, | ||||
|     join_nonempty, | ||||
|     mimetype2ext, | ||||
|     str_or_none, | ||||
| ) | ||||
| @@ -139,8 +140,8 @@ class UstreamIE(InfoExtractor): | ||||
|             content_type = stream['contentType'] | ||||
|             kind = content_type.split('/')[0] | ||||
|             f = { | ||||
|                 'format_id': '-'.join(filter(None, [ | ||||
|                     'dash', kind, str_or_none(stream.get('bitrate'))])), | ||||
|                 'format_id': join_nonempty( | ||||
|                     'dash', kind, str_or_none(stream.get('bitrate'))), | ||||
|                 'protocol': 'http_dash_segments', | ||||
|                 # TODO: generate a MPD doc for external players? | ||||
|                 'url': encode_data_uri(b'<MPD/>', 'text/xml'), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan