set retrievals to 0 for new uris
This commit is contained in:
4
ppf.py
4
ppf.py
@@ -111,9 +111,9 @@ def insert_urls(urls, search, sqlite):
|
||||
query = [ 'url=?' for u in urls ]
|
||||
known = [ i[0] for i in sqlite.execute('SELECT url FROM uris WHERE %s' % ' OR '.join(query),urls).fetchall() ]
|
||||
time_now = int(time.time())
|
||||
new = [ (time_now,i,0,0,0) for i in urls if not i in known ]
|
||||
new = [ (time_now,i,0,0,0,0) for i in urls if not i in known ]
|
||||
if not len(new): return
|
||||
sqlite.executemany('INSERT INTO uris (added,url,check_time,error,stale_count) values(?,?,?,?,?)', new)
|
||||
sqlite.executemany('INSERT INTO uris (added,url,check_time,error,stale_count,retrievals) values(?,?,?,?,?,?)', new)
|
||||
sqlite.commit()
|
||||
_log('+%d item(s) from %s' % (len(new), search), 'added')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user