@redhann Might be a couple of bugs in data_handler.py, not sure though, should lmk what you think. If there are, should probably make a branch and PR.
c.execute("""CREATE TABLE IF NOT EXISTS info_db (time_ timestamp, title text, length real, link text, filepath text, thumnbnail text);""")c.execute('''DELETE * FROM ht_db WHERE time_>=?;''',(timestamp))
1) Is ht_db supposed to be infodb here when deleting using timestamp?
2) Should time>=?; be `time<=?;as we're deleting the older timestamped rows 3) Also I think the c.execute argument should be a tuple, so shouldn't it be(timestamp,)`
Additionally, it might be nice to have a check in insert_data so that we don't insert data if the link already exists in the db.
Last nitpick might be having timestamp as an argument instead of doing it when insert_data is called, though it probably doesn't matter too much.
@redhann Might be a couple of bugs in data_handler.py, not sure though, should lmk what you think. If there are, should probably make a branch and PR.
c.execute("""CREATE TABLE IF NOT EXISTS info_db (time_ timestamp, title text, length real, link text, filepath text, thumnbnail text);""")
c.execute('''DELETE * FROM ht_db WHERE time_>=?;''',(timestamp))
1) Is ht_db supposed to be infodb here when deleting using timestamp? 2) Shouldtime>=?;
be `time<=?;as we're deleting the older timestamped rows 3) Also I think the c.execute argument should be a tuple, so shouldn't it be
(timestamp,)`Additionally, it might be nice to have a check in insert_data so that we don't insert data if the link already exists in the db.
Last nitpick might be having timestamp as an argument instead of doing it when insert_data is called, though it probably doesn't matter too much.