only add if there are new files
This commit is contained in:
parent
c1d0e044c7
commit
b6412c116d
1 changed files with 3 additions and 2 deletions
|
@ -371,9 +371,10 @@ class Client(object):
|
||||||
sql = u'SELECT oshash FROM encode WHERE site = ?'
|
sql = u'SELECT oshash FROM encode WHERE site = ?'
|
||||||
c.execute(sql, (site, ))
|
c.execute(sql, (site, ))
|
||||||
known = [row[0] for row in c]
|
known = [row[0] for row in c]
|
||||||
files = list(set(files) - set(known))
|
|
||||||
conn.close()
|
conn.close()
|
||||||
self.add_encodes(site, files)
|
files = list(set(files) - set(known))
|
||||||
|
if files:
|
||||||
|
self.add_encodes(site, files)
|
||||||
else:
|
else:
|
||||||
self.set_encodes(site, files)
|
self.set_encodes(site, files)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue