Adding __json__ to Downloader for sending them to the FE. Hiding ChannelDownloader because it will be handled specifically.

This commit is contained in:
Roland 2021-12-30 18:31:35 -07:00
parent 047b507119
commit e3c57ef674
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
3 changed files with 14 additions and 7 deletions

View file

@ -50,6 +50,7 @@ class ChannelDownloader(Downloader, ABC):
"""
name = 'video_channel'
pretty_name = 'Video Channel'
listable = False
def __repr__(self):
return f'<ChannelDownloader name={self.name}>'

View file

@ -426,3 +426,11 @@ def test_selected_downloader(test_session, video_download_manager):
mock_do_download.assert_called_once()
check_attempts(3)
def test_channel_downloader_hidden(video_download_manager):
"""
ChannelDownloader should not be presented to the User.
"""
downloaders = video_download_manager.list_downloaders()
assert downloaders == [(dict(name='video', pretty_name='Videos')), ]