mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-12 18:35:00 +02:00
Fixing scanner inodes, select all fix, starting ebook reader
This commit is contained in:
parent
29ba62357d
commit
26b37def46
21 changed files with 661 additions and 66 deletions
42
server/EbookReader.js
Normal file
42
server/EbookReader.js
Normal file
|
@ -0,0 +1,42 @@
|
|||
// const express = require('express')
|
||||
// const EPub = require('epub')
|
||||
// const Logger = require('./Logger')
|
||||
|
||||
// class EbookReader {
|
||||
// constructor(db, MetadataPath, AudiobookPath) {
|
||||
// this.db = db
|
||||
// this.MetadataPath = MetadataPath
|
||||
// this.AudiobookPath = AudiobookPath
|
||||
|
||||
// this.router = express()
|
||||
// this.init()
|
||||
// }
|
||||
|
||||
// init() {
|
||||
// this.router.get('/open/:id/:ino', this.openRequest.bind(this))
|
||||
// }
|
||||
|
||||
// openRequest(req, res) {
|
||||
// Logger.info('Open request received', req.params)
|
||||
// var audiobookId = req.params.id
|
||||
// var fileIno = req.params.ino
|
||||
// var audiobook = this.db.audiobooks.find(ab => ab.id === audiobookId)
|
||||
// if (!audiobook) {
|
||||
// return res.sendStatus(404)
|
||||
// }
|
||||
// var ebook = audiobook.ebooks.find(eb => eb.ino === fileIno)
|
||||
// if (!ebook) {
|
||||
// Logger.error('Ebook file not found', fileIno)
|
||||
// return res.sendStatus(404)
|
||||
// }
|
||||
// Logger.info('Ebook found', ebook)
|
||||
// this.open(ebook.fullPath)
|
||||
// res.sendStatus(200)
|
||||
// }
|
||||
|
||||
// open(path) {
|
||||
// var epub = new EPub(path)
|
||||
// console.log('epub', epub)
|
||||
// }
|
||||
// }
|
||||
// module.exports = EbookReader
|
Loading…
Add table
Add a link
Reference in a new issue