Работа над BookInfoDialog

This commit is contained in:
Book Pauk
2022-11-06 17:15:45 +07:00
parent 351abe9401
commit d9f1912ea2
7 changed files with 119 additions and 1 deletions

View File

@@ -437,6 +437,26 @@ class WebWorker {
}
}
async getBookInfo(params) {
this.checkMyState();
try {
//const db = this.db;
let link = await this.getBookLink(params);
const hash = path.basename(link.link);
/*const bookFile = `${this.config.filesDir}/${hash}`;
const bookInfo = await fb2parser*/
return {hash};
} catch(e) {
log(LM_ERR, `getBookInfo error: ${e.message}`);
if (e.message.indexOf('ENOENT') >= 0)
throw new Error('404 Файл не найден');
throw e;
}
}
/*
async restoreBookFile(publicPath) {
this.checkMyState();