extract cover while importing
This commit is contained in:
parent
9aef3616ba
commit
2b46ad2c16
2 changed files with 4 additions and 3 deletions
|
@ -290,9 +290,8 @@ class Item(db.Model):
|
||||||
self.update()
|
self.update()
|
||||||
self.update_cover()
|
self.update_cover()
|
||||||
self.modified = datetime.now()
|
self.modified = datetime.now()
|
||||||
db.session.add(self)
|
self.save()
|
||||||
db.session.commit()
|
user = state.user()
|
||||||
user = User.get_or_create(settings.USER_ID)
|
|
||||||
if user in self.users:
|
if user in self.users:
|
||||||
Changelog.record(user, 'edititem', self.id, record)
|
Changelog.record(user, 'edititem', self.id, record)
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,8 @@ def add_file(id, f, prefix):
|
||||||
})
|
})
|
||||||
item.added = datetime.now()
|
item.added = datetime.now()
|
||||||
item.scrape()
|
item.scrape()
|
||||||
|
item.update_cover()
|
||||||
|
item.save()
|
||||||
return file
|
return file
|
||||||
|
|
||||||
def run_scan():
|
def run_scan():
|
||||||
|
|
Loading…
Reference in a new issue