diff --git a/src/calibre/ebooks/mobi/writer2/serializer.py b/src/calibre/ebooks/mobi/writer2/serializer.py index 9bbaa436a7..247adbf7c7 100644 --- a/src/calibre/ebooks/mobi/writer2/serializer.py +++ b/src/calibre/ebooks/mobi/writer2/serializer.py @@ -85,7 +85,8 @@ class Serializer(object): spine_item(item).is_section_start = True for i, article in enumerate(articles): si = spine_item(article) - si.is_article_start = True + if si is not None: + si.is_article_start = True items = list(self.oeb.spine) in_sec = in_art = False @@ -116,7 +117,7 @@ class Serializer(object): buf.write(b'') self.end_offset = buf.tell() self.fixup_links() - if self.start_offset is None: + if self.start_offset is None and not self.is_periodical: # If we don't set a start offset, the stupid Kindle will # open the book at the location of the first IndexEntry, which # could be anywhere. So ensure the book is always opened at the