Adding toggle to Channel page to stop downloading comments for certain channels.

This commit is contained in:
Roland 2025-02-19 14:52:50 -07:00
parent 47d4d72bf8
commit 581d5eaf6e
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
20 changed files with 150 additions and 77 deletions

View file

@ -288,6 +288,25 @@ async def test_import_channel_delete_missing_channels(await_switches, test_sessi
assert str(channel2.directory) not in test_channels_config.read_text()
@pytest.mark.asyncio
async def test_import_channel_download_comments(await_switches, test_session, channel_factory,
test_channels_config):
channel = channel_factory()
assert channel.download_missing_data is True
# download_missing_data is saved to the config.
save_channels_config()
await await_switches()
assert 'download_missing_data: true' in test_channels_config.read_text()
# change download_missing_data to False, channel should be updated on import.
contents = test_channels_config.read_text()
contents = contents.replace('download_missing_data: true', 'download_missing_data: false')
test_channels_config.write_text(contents)
import_channels_config()
assert channel.download_missing_data is False
@pytest.mark.asyncio
async def test_ffprobe_json(async_client, video_file, corrupted_video_file):
content = await common.ffprobe_json(video_file)