diff --git a/src/calibre/ebooks/mobi/writer.py b/src/calibre/ebooks/mobi/writer.py index 82ed1da7c1..291e937b2c 100644 --- a/src/calibre/ebooks/mobi/writer.py +++ b/src/calibre/ebooks/mobi/writer.py @@ -735,7 +735,7 @@ class MobiWriter(object): # The PalmDOC Header record0.write(pack('>HHIHHHH', self._compression, 0, self._text_length, - self._text_nrecords, RECORD_SIZE, 0, 0)) # 0 - 15 (0x0 - 0xf) + self._text_nrecords-1, RECORD_SIZE, 0, 0)) # 0 - 15 (0x0 - 0xf) uid = random.randint(0, 0xffffffff) title = str(metadata.title[0]) # The MOBI Header diff --git a/upload.py b/upload.py index 973e31c8ab..b3b1d9035a 100644 --- a/upload.py +++ b/upload.py @@ -707,6 +707,15 @@ class stage1(OptionlessCommand): ('upload_demo', None), ] +class betas(OptionlessCommand): + description = 'Build an upload beta builds to the servers' + + sub_commands = [ ('stage2', None) ] + + def run(self): + OptionlessCommand.run(self) + check_call('scp dist/* divok:'+BETAS, shell=True) + class upload(OptionlessCommand): description = 'Build and upload calibre to the servers'