]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/extra-utils/videos/channels.ts
Add ability to remove hls/webtorrent files
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / channels.ts
CommitLineData
254d3579 1import { PeerTubeServer } from '../server/server'
a5461888 2
254d3579 3function setDefaultVideoChannel (servers: PeerTubeServer[]) {
a5461888
C
4 const tasks: Promise<any>[] = []
5
6 for (const server of servers) {
89d241a7
C
7 const p = server.users.getMyInfo()
8 .then(user => { server.store.channel = user.videoChannels[0] })
a5461888
C
9
10 tasks.push(p)
11 }
12
13 return Promise.all(tasks)
14}
15
16export {
17 setDefaultVideoChannel
18}