New data model save covers, scanner, new api routes

This commit is contained in:
advplyr 2022-03-12 17:45:32 -06:00
parent 5f4e5cd3d8
commit 73257188f6
37 changed files with 1649 additions and 672 deletions

View file

@ -11,9 +11,7 @@ const { writeConcatFile, writeMetadataFile } = require('./utils/ffmpegHelpers')
const { getFileSize } = require('./utils/fileUtils')
const TAG = 'DownloadManager'
class DownloadManager {
constructor(db, Uid, Gid) {
this.Uid = Uid
this.Gid = Gid
constructor(db) {
this.db = db
this.downloadDirPath = Path.join(global.MetadataPath, 'downloads')
@ -344,7 +342,7 @@ class DownloadManager {
}
// Set file permissions and ownership
await filePerms(download.fullPath, 0o774, this.Uid, this.Gid)
await filePerms.setDefault(download.fullPath)
var filesize = await getFileSize(download.fullPath)
download.setComplete(filesize)