mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-10-31 10:37:00 -04:00 
			
		
		
		
	Use kindlegen major version based on OS
This commit is contained in:
		
							parent
							
								
									c621ce6645
								
							
						
					
					
						commit
						a814e8429e
					
				| @ -11,6 +11,7 @@ import re | ||||
| from struct import pack | ||||
| from io import BytesIO | ||||
| 
 | ||||
| from calibre.constants import iswindows, isosx | ||||
| from calibre.ebooks.mobi.utils import (utf8_text, to_base) | ||||
| from calibre.utils.localization import lang_as_iso639_1 | ||||
| from calibre.ebooks.metadata import authors_to_sort_string | ||||
| @ -149,7 +150,8 @@ def build_exth(metadata, prefer_author_sort=False, is_periodical=False, | ||||
|         nrecs += 1 | ||||
| 
 | ||||
|     if be_kindlegen2: | ||||
|         vals = {204:202, 205:2, 206:9, 207:0} | ||||
|         mv = 200 if iswindows else 202 if isosx else 201 | ||||
|         vals = {204:mv, 205:2, 206:9, 207:0} | ||||
|     elif is_periodical: | ||||
|         # Pretend to be amazon's super secret periodical generator | ||||
|         vals = {204:201, 205:2, 206:0, 207:101} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user