aerkalov/ebooklib

Maybe elif is more appropriate

booknc opened this issue · 1 comments

if media_type == 'application/smil+xml':

Maybe elif is more appropriate
if media_type == 'application/x-dtbncx+xml':
ei = EpubNcx(uid=r.get('id'), file_name=unquote(r.get('href')))

            ei.content = self.read_file(zip_path.join(self.opf_dir, ei.file_name))
        if media_type == 'application/smil+xml':                                                           <------------------------------- this line
            ei = EpubSMIL(uid=r.get('id'), file_name=unquote(r.get('href')))

            ei.content = self.read_file(zip_path.join(self.opf_dir, ei.file_name))
        elif media_type == 'application/xhtml+xml':

Otherwise, EpubNcx is eventually replaced with EpubItem

Thanks! Yes, for sure :) Just merged PR someone send about this!