]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/extra-utils/videos/channels.ts
Introduce videos command
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / channels.ts
CommitLineData
a5461888 1import { ServerInfo } from '../server/servers'
a5461888
C
2
3function setDefaultVideoChannel (servers: ServerInfo[]) {
4 const tasks: Promise<any>[] = []
5
6 for (const server of servers) {
7926c5f9
C
7 const p = server.usersCommand.getMyInfo()
8 .then(user => { server.videoChannel = user.videoChannels[0] })
a5461888
C
9
10 tasks.push(p)
11 }
12
13 return Promise.all(tasks)
14}
15
16export {
17 setDefaultVideoChannel
18}