1
0
Fork 0
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:
Chocobozzz 2016-05-10 21:19:24 +02:00
parent f1dae01868
commit cbe2f7c348
19 changed files with 312 additions and 162 deletions

View file

@ -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) {