only add if there are new files

This commit is contained in:
j 2016-08-24 18:38:09 +02:00
parent c1d0e044c7
commit b6412c116d

View file

@ -371,8 +371,9 @@ class Client(object):
sql = u'SELECT oshash FROM encode WHERE site = ?'
c.execute(sql, (site, ))
known = [row[0] for row in c]
files = list(set(files) - set(known))
conn.close()
files = list(set(files) - set(known))
if files:
self.add_encodes(site, files)
else:
self.set_encodes(site, files)