mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Put private videos under a specific subdirectory
This commit is contained in:
parent
38a3ccc7f8
commit
3545e72c68
105 changed files with 2929 additions and 1308 deletions
|
@ -1,6 +1,6 @@
|
|||
import ffmpeg, { FfmpegCommand } from 'fluent-ffmpeg'
|
||||
import { buildAbsoluteFixturePath, wait } from '@shared/core-utils'
|
||||
import { VideoDetails, VideoInclude } from '@shared/models'
|
||||
import { VideoDetails, VideoInclude, VideoPrivacy } from '@shared/models'
|
||||
import { PeerTubeServer } from '../server/server'
|
||||
|
||||
function sendRTMPStream (options: {
|
||||
|
@ -98,7 +98,10 @@ async function waitUntilLiveReplacedByReplayOnAllServers (servers: PeerTubeServe
|
|||
}
|
||||
|
||||
async function findExternalSavedVideo (server: PeerTubeServer, liveDetails: VideoDetails) {
|
||||
const { data } = await server.videos.list({ token: server.accessToken, sort: '-publishedAt', include: VideoInclude.BLACKLISTED })
|
||||
const include = VideoInclude.BLACKLISTED
|
||||
const privacyOneOf = [ VideoPrivacy.INTERNAL, VideoPrivacy.PRIVATE, VideoPrivacy.PUBLIC, VideoPrivacy.UNLISTED ]
|
||||
|
||||
const { data } = await server.videos.list({ token: server.accessToken, sort: '-publishedAt', include, privacyOneOf })
|
||||
|
||||
return data.find(v => v.name === liveDetails.name + ' - ' + new Date(liveDetails.publishedAt).toLocaleString())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue