From e1069301fa7a91c171be66db6dfd06af4cc05053 Mon Sep 17 00:00:00 2001 From: Schimon Jehudah Date: Thu, 12 Oct 2023 11:13:46 +0000 Subject: [PATCH] Pass title string instead of a parsed feed --- slixfeed/database.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slixfeed/database.py b/slixfeed/database.py index 1958b68..f6e4d15 100644 --- a/slixfeed/database.py +++ b/slixfeed/database.py @@ -101,12 +101,12 @@ def get_cursor(db_file): return CURSORS[db_file] -async def add_feed(db_file, feed, url, res): +async def add_feed(db_file, title, url, res): """ Add a new feed into the feeds table. :param db_file: Database filename. - :param feed: Parsed XML document. + :param title: Feed title. :param url: URL. :param res: XML document. :return: Message. @@ -126,7 +126,7 @@ async def add_feed(db_file, feed, url, res): async with DBLOCK: with create_connection(db_file) as conn: cur = conn.cursor() - title = feed["feed"]["title"] + # title = feed["feed"]["title"] feed = (title, url, 1, res[1], 1) sql = """INSERT INTO feeds(name, address, enabled, status, valid) VALUES(?, ?, ?, ?, ?) """