forked from sch/Slixfeed
Pass title string instead of a parsed feed
This commit is contained in:
parent
b1d1af5100
commit
e1069301fa
1 changed files with 3 additions and 3 deletions
|
@ -101,12 +101,12 @@ def get_cursor(db_file):
|
||||||
return CURSORS[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.
|
Add a new feed into the feeds table.
|
||||||
|
|
||||||
:param db_file: Database filename.
|
:param db_file: Database filename.
|
||||||
:param feed: Parsed XML document.
|
:param title: Feed title.
|
||||||
:param url: URL.
|
:param url: URL.
|
||||||
:param res: XML document.
|
:param res: XML document.
|
||||||
:return: Message.
|
:return: Message.
|
||||||
|
@ -126,7 +126,7 @@ async def add_feed(db_file, feed, url, res):
|
||||||
async with DBLOCK:
|
async with DBLOCK:
|
||||||
with create_connection(db_file) as conn:
|
with create_connection(db_file) as conn:
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
title = feed["feed"]["title"]
|
# title = feed["feed"]["title"]
|
||||||
feed = (title, url, 1, res[1], 1)
|
feed = (title, url, 1, res[1], 1)
|
||||||
sql = """INSERT INTO feeds(name, address, enabled, status, valid)
|
sql = """INSERT INTO feeds(name, address, enabled, status, valid)
|
||||||
VALUES(?, ?, ?, ?, ?) """
|
VALUES(?, ?, ?, ?, ?) """
|
||||||
|
|
Loading…
Reference in a new issue