mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 17:36:18 -05:00
Fixing starting downloads on startup.
This commit is contained in:
parent
54aa191ff5
commit
08a67eaf74
2 changed files with 14 additions and 7 deletions
|
|
@ -19,7 +19,7 @@ from wrolpi.common import ConfigFile, extract_domain, logger, \
|
|||
escape_file_name, get_media_directory, background_task, Base, get_wrolpi_config
|
||||
from wrolpi.dates import Seconds, from_timestamp
|
||||
from wrolpi.db import get_db_curs, get_db_session
|
||||
from wrolpi.downloader import Download
|
||||
from wrolpi.downloader import Download, download_manager
|
||||
from wrolpi.errors import UnknownDirectory
|
||||
from wrolpi.events import Events
|
||||
from wrolpi.files.lib import split_path_stem_and_suffix
|
||||
|
|
@ -297,8 +297,9 @@ class ChannelsConfig(ConfigFile):
|
|||
|
||||
if not channel.source_id and channel.url and flags.have_internet.is_set():
|
||||
# If we can download from a channel, we must have its source_id.
|
||||
logger.info(f'Fetching channel source id for {channel}')
|
||||
background_task(fetch_channel_source_id(channel.id))
|
||||
if download_manager.can_download:
|
||||
logger.info(f'Fetching channel source id for {channel}')
|
||||
background_task(fetch_channel_source_id(channel.id))
|
||||
|
||||
channel_import_logger.debug(f'Updated {repr(channel.name)}'
|
||||
f' url={channel.url}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue