make mobi wasn't setting provider

pull/46/head
eric 2017-12-14 14:19:20 -05:00
parent 3ae537132e
commit 15d281c988
2 changed files with 6 additions and 2 deletions

View File

@ -23,11 +23,14 @@ class Command(BaseCommand):
ebf = ebook.get_archive_ebf()
if ebf:
try:
print 'making mobi for {}'.format(work.title)
if ebf.make_mobi():
print 'made mobi for {}'.format(ebf.edition.work.title)
print 'made mobi'
i = i + 1
break
else:
print 'failed to make mobi'
except:
pass
print 'failed to make mobi'
if i >= max:
break

View File

@ -1089,6 +1089,7 @@ class EbookFile(models.Model):
new_ebook = Ebook.objects.create(
edition=self.edition,
format='mobi',
provider='Unglue.it',
url=new_mobi_ebf.file.url,
rights=self.ebook.rights,
version_label=self.ebook.version_label,