mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-26 02:39:05 +02:00
Adding download tab and download manager, ffmpeg in worker thread
This commit is contained in:
parent
a86bda59f6
commit
e4dac5dd05
28 changed files with 757 additions and 60 deletions
48
server/objects/AudiobookFile.js
Normal file
48
server/objects/AudiobookFile.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
class AudiobookFile {
|
||||
constructor(data) {
|
||||
this.ino = null
|
||||
this.filetype = null
|
||||
this.filename = null
|
||||
this.ext = null
|
||||
this.path = null
|
||||
this.fullPath = null
|
||||
this.addedAt = null
|
||||
|
||||
if (data) {
|
||||
this.construct(data)
|
||||
}
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return {
|
||||
ino: this.ino || null,
|
||||
filetype: this.filetype,
|
||||
filename: this.filename,
|
||||
ext: this.ext,
|
||||
path: this.path,
|
||||
fullPath: this.fullPath,
|
||||
addedAt: this.addedAt
|
||||
}
|
||||
}
|
||||
|
||||
construct(data) {
|
||||
this.ino = data.ino || null
|
||||
this.filetype = data.filetype
|
||||
this.filename = data.filename
|
||||
this.ext = data.ext
|
||||
this.path = data.path
|
||||
this.fullPath = data.fullPath
|
||||
this.addedAt = data.addedAt
|
||||
}
|
||||
|
||||
setData(data) {
|
||||
this.ino = data.ino || null
|
||||
this.filetype = data.filetype
|
||||
this.filename = data.filename
|
||||
this.ext = data.ext
|
||||
this.path = data.path
|
||||
this.fullPath = data.fullPath
|
||||
this.addedAt = Date.now()
|
||||
}
|
||||
}
|
||||
module.exports = AudiobookFile
|
Loading…
Add table
Add a link
Reference in a new issue