extract cover while importing

This commit is contained in:
j 2014-05-19 12:57:07 +02:00
parent 9aef3616ba
commit 2b46ad2c16
2 changed files with 4 additions and 3 deletions

View file

@ -290,9 +290,8 @@ class Item(db.Model):
self.update()
self.update_cover()
self.modified = datetime.now()
db.session.add(self)
db.session.commit()
user = User.get_or_create(settings.USER_ID)
self.save()
user = state.user()
if user in self.users:
Changelog.record(user, 'edititem', self.id, record)

View file

@ -60,6 +60,8 @@ def add_file(id, f, prefix):
})
item.added = datetime.now()
item.scrape()
item.update_cover()
item.save()
return file
def run_scan():