interim solution to migrate to sha1
This commit is contained in:
parent
de91269926
commit
33d1cd3cd3
2 changed files with 7 additions and 2 deletions
|
|
@ -258,6 +258,7 @@ class ArchiveFile(SQLObject):
|
|||
ALTER TABLE archive_file CHANGE srt srt LONGTEXT;
|
||||
'''
|
||||
md5sum = UnicodeCol(length=128, alternateID=True)
|
||||
sha1sum = UnicodeCol(length=40)
|
||||
oxdb = UnicodeCol(length=128)
|
||||
path = UnicodeCol()
|
||||
date = DateTimeCol()
|
||||
|
|
@ -289,7 +290,10 @@ class ArchiveFile(SQLObject):
|
|||
broken = BoolCol(default = False)
|
||||
|
||||
extracted = BoolCol(default = False)
|
||||
|
||||
|
||||
def genSHA1(self):
|
||||
self.sha1sum = oxdb_import.oxdb_sha1sum(self.path)
|
||||
|
||||
def _get_part(self):
|
||||
part = 1
|
||||
parts = re.compile('Part (\d)').findall(self.path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue