sectionId are undefined in the structure array
bensamazingsoft opened this issue · 2 comments
bensamazingsoft commented
I tried with several .epub from www.bibebook.com. The IDs are always undefined
the file I'm using for exemple:
http://www.bibebook.com/files/ebook/libre/V2/dumas_alexandre_-_le_docteur_mysterieux_i.epub
I'm using the library in a Vue component:
<v-col>
<v-file-input v-model="file" accept=".epub" label="File input"></v-file-input>
<v-btn v-if="filePresent" @click="handleRead">Lire</v-btn>
</v-col>
...
private handleRead() {
const reader = new FileReader();
reader.onload = evt => {
parseEpub(evt.target!.result as Buffer)
.then((res: Epub) => this.setBook(res))
.catch((err: Error) => window.alert(err.message));
};
reader.readAsArrayBuffer(this.file);
}
private setBook(b: Epub) {
this.book = b;
console.log(this.book);
}
mbykov commented
Hi, I have the same problem, but with your own epub files like test/file1, etc.
just in plain npm v2.0.3:
structure: [
{
name: '扉页',
sectionId: undefined,
nodeId: undefined,
path: 'text/part0000.html',
playOrder: '1',
children: undefined
},