}
function downloadYoutubeDLVideo (url: string) {
- const hash = crypto.createHash('sha256').update(url).digest('base64')
+ const hash = crypto.createHash('sha256').update(url).digest('hex')
const path = join(CONFIG.STORAGE.VIDEOS_DIR, hash + '-import.mp4')
logger.info('Importing video %s', url)
}
function descriptionTruncation (description: string) {
- if (!description) return undefined
+ if (!description || description.length < CONSTRAINTS_FIELDS.VIDEOS.DESCRIPTION.min) return undefined
return truncate(description, {
'length': CONSTRAINTS_FIELDS.VIDEOS.DESCRIPTION.max,