mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Refractoring and add thumbnails support (without tests)
This commit is contained in:
parent
f1dae01868
commit
cbe2f7c348
19 changed files with 312 additions and 162 deletions
|
@ -1,9 +1,20 @@
|
|||
'use strict'
|
||||
|
||||
const crypto = require('crypto')
|
||||
|
||||
const logger = require('./logger')
|
||||
|
||||
const utils = {
|
||||
cleanForExit: cleanForExit
|
||||
cleanForExit: cleanForExit,
|
||||
generateRandomString: generateRandomString
|
||||
}
|
||||
|
||||
function generateRandomString (size, callback) {
|
||||
crypto.pseudoRandomBytes(size, function (err, raw) {
|
||||
if (err) return callback(err)
|
||||
|
||||
callback(null, raw.toString('hex'))
|
||||
})
|
||||
}
|
||||
|
||||
function cleanForExit (webtorrent_process) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue