mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 17:22:31 +01:00
[downloader/external] Simplify source_address
'' might actually be passed in, so check for None.
This commit is contained in:
parent
ea71034bd3
commit
cc9ca3ba6e
@ -46,11 +46,10 @@ def supports(cls, info_dict):
|
|||||||
return info_dict['protocol'] in ('http', 'https', 'ftp', 'ftps')
|
return info_dict['protocol'] in ('http', 'https', 'ftp', 'ftps')
|
||||||
|
|
||||||
def _source_address(self, command_option):
|
def _source_address(self, command_option):
|
||||||
command_part = []
|
|
||||||
source_address = self.params.get('source_address')
|
source_address = self.params.get('source_address')
|
||||||
if source_address:
|
if source_address is None:
|
||||||
command_part = [command_option, source_address]
|
return []
|
||||||
return command_part
|
return [command_option, source_address]
|
||||||
|
|
||||||
def _call_downloader(self, tmpfilename, info_dict):
|
def _call_downloader(self, tmpfilename, info_dict):
|
||||||
""" Either overwrite this or implement _make_cmd """
|
""" Either overwrite this or implement _make_cmd """
|
||||||
|
Loading…
Reference in New Issue
Block a user