1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Add basic video editor support

This commit is contained in:
Chocobozzz 2022-02-11 10:51:33 +01:00 committed by Chocobozzz
parent a24bf4dc65
commit c729caf6cc
130 changed files with 3969 additions and 1353 deletions

View file

@ -19,6 +19,7 @@ import { buildActorInstance } from './local-actor'
import { Redis } from './redis'
import { createLocalVideoChannel } from './video-channel'
import { createWatchLaterPlaylist } from './video-playlist'
import { logger } from '@server/helpers/logger'
type ChannelNames = { name: string, displayName: string }
@ -159,6 +160,11 @@ async function isAbleToUploadVideo (userId: number, newVideoSize: number) {
const uploadedTotal = newVideoSize + totalBytes
const uploadedDaily = newVideoSize + totalBytesDaily
logger.debug(
'Check user %d quota to upload another video.', userId,
{ totalBytes, totalBytesDaily, videoQuota: user.videoQuota, videoQuotaDaily: user.videoQuotaDaily, newVideoSize }
)
if (user.videoQuotaDaily === -1) return uploadedTotal < user.videoQuota
if (user.videoQuota === -1) return uploadedDaily < user.videoQuotaDaily