mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:04:12 +02:00
...
This commit is contained in:
parent
2d2a894e05
commit
7697b16e4a
1 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
from cssutils import replaceUrls
|
||||
|
||||
from calibre import guess_type
|
||||
from calibre.ebooks.oeb.polish.container import guess_type
|
||||
from calibre.ebooks.oeb.base import (OEB_DOCS, OEB_STYLES, rewrite_links)
|
||||
|
||||
class LinkReplacer(object):
|
||||
|
|
@ -41,7 +41,7 @@ def __call__(self, url):
|
|||
return href
|
||||
|
||||
def replace_links(container, link_map, frag_map=lambda name, frag:frag):
|
||||
ncx_type = guess_type('toc.ncx')[0]
|
||||
ncx_type = guess_type('toc.ncx')
|
||||
for name, media_type in container.mime_map.iteritems():
|
||||
repl = LinkReplacer(name, container, link_map, frag_map)
|
||||
if media_type.lower() in OEB_DOCS:
|
||||
|
|
|
|||
Loading…
Reference in a new issue