From fa0ccedd8b5d9c8ceeced5537ba1d639acd00a12 Mon Sep 17 00:00:00 2001 From: Roland Date: Sat, 15 Jan 2022 13:52:43 -0700 Subject: [PATCH] Fetching next_download for each channel. --- modules/videos/channel/lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/videos/channel/lib.py b/modules/videos/channel/lib.py index 1390ea1a..64e329ec 100644 --- a/modules/videos/channel/lib.py +++ b/modules/videos/channel/lib.py @@ -24,7 +24,8 @@ async def get_minimal_channels() -> List[dict]: # Get all channels, even if they don't have videos. stmt = ''' SELECT - c.id, name, link, directory, url, download_frequency, info_date + c.id, name, link, directory, url, download_frequency, info_date, + (select next_download from download d where d.url=c.url) AS next_download FROM channel AS c ORDER BY LOWER(name)