mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-10-31 07:13:02 +00:00 
			
		
		
		
	epub metadata import fix
This commit is contained in:
		| @@ -64,6 +64,11 @@ def get_epub_info(tmp_file_path, original_file_name, original_file_extension): | |||||||
|     for s in ['title', 'description', 'creator', 'language', 'subject']: |     for s in ['title', 'description', 'creator', 'language', 'subject']: | ||||||
|         tmp = p.xpath('dc:%s/text()' % s, namespaces=ns) |         tmp = p.xpath('dc:%s/text()' % s, namespaces=ns) | ||||||
|         if len(tmp) > 0: |         if len(tmp) > 0: | ||||||
|  |             if s == 'creator': | ||||||
|  |                  epub_metadata[s] = ' & '.join(p.xpath('dc:%s/text()' % s, namespaces=ns)) | ||||||
|  |             elif s == 'language' or s == 'subject': | ||||||
|  |                  epub_metadata[s] = ', '.join(p.xpath('dc:%s/text()' % s, namespaces=ns)) | ||||||
|  |             else: | ||||||
|                 epub_metadata[s] = p.xpath('dc:%s/text()' % s, namespaces=ns)[0] |                 epub_metadata[s] = p.xpath('dc:%s/text()' % s, namespaces=ns)[0] | ||||||
|         else: |         else: | ||||||
|             epub_metadata[s] = "Unknown" |             epub_metadata[s] = "Unknown" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jan Guzej
					Jan Guzej