mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +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
|
@ -12,6 +12,7 @@ import {
|
|||
ResultList,
|
||||
VideoCreateResult,
|
||||
VideoDetails,
|
||||
VideoPrivacy,
|
||||
VideoState
|
||||
} from '@shared/models'
|
||||
import { unwrapBody } from '../requests'
|
||||
|
@ -115,6 +116,31 @@ export class LiveCommand extends AbstractCommand {
|
|||
return body.video
|
||||
}
|
||||
|
||||
async quickCreate (options: OverrideCommandOptions & {
|
||||
saveReplay: boolean
|
||||
permanentLive: boolean
|
||||
privacy?: VideoPrivacy
|
||||
}) {
|
||||
const { saveReplay, permanentLive, privacy } = options
|
||||
|
||||
const { uuid } = await this.create({
|
||||
...options,
|
||||
|
||||
fields: {
|
||||
name: 'live',
|
||||
permanentLive,
|
||||
saveReplay,
|
||||
channelId: this.server.store.channel.id,
|
||||
privacy
|
||||
}
|
||||
})
|
||||
|
||||
const video = await this.server.videos.getWithToken({ id: uuid })
|
||||
const live = await this.get({ videoId: uuid })
|
||||
|
||||
return { video, live }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
async sendRTMPStreamInVideo (options: OverrideCommandOptions & {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue