lnreader icon indicating copy to clipboard operation
lnreader copied to clipboard

"Table of content (toc.ncx) does not exist!" but it does (?)

Open lalalasupa0 opened this issue 1 year ago • 6 comments

Steps to reproduce

Import epub Select ~~https://buzzheavier.com/f/GZhdMTEw8AA~~ https://www.mediafire.com/file/iwr4rrnyvn4abjr/[Untitled+Translations+x+Reversi+Blog]+Kage+no+Jitsuryokusha+ni+Naritakute+-+Volumen+06.epub/file

Expected behavior

Should import the epub

Actual behavior

Notification "Table of content (toc.ncx) does not exist!" and the epub doesn't get imported

LNReader version

Github Action 2.0.0 (04/10/24 11:55 AM UTC) Commit: 9c682605

Android version

Android 12

Device

Samsung S10+

Other details

Within the epub there is a file with the specified extension "ncx" called 'contents.ncx'

I viewed inside that file and this is what it looks like

<?xml version="1.0" encoding="utf-8"?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">

<head>
    <meta name="dtb:uid" content="urn:uuid:80f03a49-46af-99cc-c7b2-1aab99dcbba2"/>
    <meta name="dtb:depth" content="1"/>
    <meta name="dtb:totalPageCount" content="0"/>
    <meta name="dtb:maxPageNumber" content="0"/>
</head>

 <docTitle>
      <text>Tabla de contenidos</text>
 </docTitle>
    
<navMap>
    <navPoint id="ncx0" playOrder="1"><navLabel><text>Portada</text></navLabel><content src="ch1.xhtml"></content></navPoint><navPoint id="ncx1" playOrder="2"><navLabel><text>Ilustraciones</text></navLabel><content src="sl8300.xhtml"></content></navPoint><navPoint id="ncx2" playOrder="3"><navLabel><text>Contenido</text></navLabel><content src="szlpai.xhtml"></content></navPoint><navPoint id="ncx3" playOrder="4"><navLabel><text>The Eminence in Shadow</text></navLabel><content src="sdph6w.xhtml"></content></navPoint><navPoint id="ncx4" playOrder="5"><navLabel><text>Créditos</text></navLabel><content src="sehhv4.xhtml"></content></navPoint><navPoint id="ncx5" playOrder="6"><navLabel><text>«Prólogo»  Los Oscuros Gobernantes del Reino de Midgar… ¡Qué Envidia!  </text></navLabel><content src="scp101.xhtml"></content></navPoint><navPoint id="ncx6" playOrder="7"><navLabel><text>«Capítulo 1»  ¡‘Jack el Destripador’ ha llegado al Reino! </text></navLabel><content src="swb6cz.xhtml"></content></navPoint><navPoint id="ncx7" playOrder="8"><navLabel><text>«Capítulo 2»  ¡Un Asesino irrumpe en la fiesta de pijamas!  </text></navLabel><content src="snvvhb.xhtml"></content></navPoint><navPoint id="ncx8" playOrder="9"><navLabel><text>«Capítulo 3»  ¡Descifrando el Aviso del Crimen! </text></navLabel><content src="s5fv8n.xhtml"></content></navPoint><navPoint id="ncx9" playOrder="10"><navLabel><text>«Capítulo 4»  ¡El monstruo se convierte en leyenda!  </text></navLabel><content src="skp2n7.xhtml"></content></navPoint><navPoint id="ncx10" playOrder="11"><navLabel><text>«Anexo»  ¡La heredera del monstruo!  </text></navLabel><content src="s7erj4.xhtml"></content></navPoint><navPoint id="ncx11" playOrder="12"><navLabel><text>«Historia Tranquila, Digresión»  Juramento en la Pradera  </text></navLabel><content src="sfn30p.xhtml"></content></navPoint><navPoint id="ncx12" playOrder="13"><navLabel><text>«Capítulo 5»  ¡Bienvenida a Shadow Garden! </text></navLabel><content src="sstqzr.xhtml"></content></navPoint><navPoint id="ncx13" playOrder="14"><navLabel><text>«Epílogo»  El aroma de los árboles que persistía. </text></navLabel><content src="shx4wt.xhtml"></content></navPoint><navPoint id="ncx14" playOrder="15"><navLabel><text>Apéndice</text></navLabel><content src="sy9r8p.xhtml"></content></navPoint><navPoint id="ncx15" playOrder="16"><navLabel><text>Diario de Alpha sobre Gestión de la Organización</text></navLabel><content src="sgv5ru.xhtml"></content></navPoint><navPoint id="ncx16" playOrder="17"><navLabel><text>Palabras del Autor</text></navLabel><content src="srqexm.xhtml"></content></navPoint><navPoint id="ncx17" playOrder="18"><navLabel><text>Palabras del Traductor</text></navLabel><content src="snsav0.xhtml"></content></navPoint><navPoint id="ncx18" playOrder="19"><navLabel><text>Agradecimientos Patreon</text></navLabel><content src="s4pps1.xhtml"></content></navPoint>
</navMap>
    
</ncx>

The <docTitle> gives us Tabla de contenidos, which means "Table of Content" in English, so I guess the file is there, but with a different name, which in this case would be "contents" instead of "toc"

I hope that's all there is to it

Acknowledgements

  • [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • [X] I have written a short but informative title.
  • [X] If this is an issue with a source, I should be opening an issue in the sources repository.
  • [X] I have updated the app to version 2.0.0.
  • [X] I will fill out all of the requested information in this form.

lalalasupa0 avatar Oct 10 '24 10:10 lalalasupa0

that epub is literally 13 bytes. there is nothing inside

Palloxin avatar Oct 10 '24 11:10 Palloxin

that epub is literally 13 bytes. there is nothing inside

https://www.mediafire.com/file/iwr4rrnyvn4abjr/[Untitled+Translations+x+Reversi+Blog]+Kage+no+Jitsuryokusha+ni+Naritakute+-+Volumen+06.epub/file

lalalasupa0 avatar Oct 10 '24 11:10 lalalasupa0

No .toc files found inside it. Close the issue.

Palloxin avatar Oct 10 '24 11:10 Palloxin

No .toc files found inside it. Close the issue.

That's what I talk abt in this issue, there is no file with the filename "toc" specifically but there is one with the same content and extension that a file with the filename 'toc' has (I'm not so sure about this) but with another filename, would prefer a confirmation from the dev before closing

lalalasupa0 avatar Oct 10 '24 11:10 lalalasupa0

~~no .toc file found. It's not a bug. Make a feature request~~ edit: current method only searches for "toc.ncx" In that epub it is "content.ncx". "toc.ncx" does not exist so u should ask a feature request to include tocs that arent specifically named "toc.ncx"

Palloxin avatar Oct 10 '24 11:10 Palloxin

no .toc file found. It's not a bug. Make a feature request

In that case it would only result in a Label change, I dunno if it's really necessary And technically it is a bug since I guess the importer only takes into account the filenames and not their extension or content (if I was right before)

lalalasupa0 avatar Oct 10 '24 11:10 lalalasupa0

fixed in latest commit

Palloxin avatar May 26 '25 18:05 Palloxin