Put stream downloader options into its own class, and make stream downloader options global to the stream type rather than specific to each factory. Show downloader options in the lbrynet-downloader-gui. Make a class for downloader option choices, so that the descriptions can be displayed. In the console, if there are multiple choices for the download option, make it a list selected by its index. Make sure that the ConnectionManager closes properly when some of the connections fail to open (e.g. due to a host being down)
16 lines
No EOL
737 B
Python
16 lines
No EOL
737 B
Python
class DownloadChoice(object):
|
|
def __init__(self, value, short_description, long_description, bool_options_description=None):
|
|
self.value = value
|
|
self.short_description = short_description
|
|
self.long_description = long_description
|
|
self.bool_options_description = bool_options_description
|
|
|
|
|
|
class DownloadOption(object):
|
|
def __init__(self, option_types, long_description, short_description, default_value,
|
|
default_value_description):
|
|
self.option_types = option_types
|
|
self.long_description = long_description
|
|
self.short_description = short_description
|
|
self.default_value = default_value
|
|
self.default_value_description = default_value_description |