ignore
This commit is contained in:
parent
e46666b6d9
commit
40d1554124
2 changed files with 6 additions and 3 deletions
|
@ -130,11 +130,11 @@ class Archive(SQLObject):
|
|||
print self.basePath
|
||||
files = oxdb_import.oxdb_spider(self.basePath)
|
||||
|
||||
oxdb_files = self.file_list()
|
||||
oxdb_files = self.file_list
|
||||
md5sum_on_disk = []
|
||||
for f in files:
|
||||
meta = oxdb_import.oxdb_file_stats(f)
|
||||
f = f.replace(base, '')
|
||||
f = f.replace(self.basePath, '')
|
||||
if oxdb_files.has_key(f) and oxdb_files[f]['size'] == meta['size']:
|
||||
stats['skipped'] += 1
|
||||
md5sum_on_disk.append(oxdb_files[f]['md5sum'])
|
||||
|
@ -142,7 +142,10 @@ class Archive(SQLObject):
|
|||
meta = oxdb_import.oxdb_file_metadata(meta)
|
||||
#remove base
|
||||
meta['path'] = f.encode('utf-8')
|
||||
#ignore files changed in the last 5 minutes
|
||||
#FIXME: check input
|
||||
for key in ['bpp', 'size', 'length', 'date']:
|
||||
meta[key] = int(float(meta[key]))
|
||||
meta['date'] = datetime.fromtimestamp(meta['date'])
|
||||
print self.addFile(meta), f
|
||||
stats['added'] += 1
|
||||
md5sum_on_disk.append(meta['md5sum'])
|
||||
|
|
BIN
oxdbarchive/static/images/favicon.ico
Normal file
BIN
oxdbarchive/static/images/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in a new issue