diff options
Diffstat (limited to 'shared/extra-utils/videos')
-rw-r--r-- | shared/extra-utils/videos/channels.ts | 6 | ||||
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/shared/extra-utils/videos/channels.ts b/shared/extra-utils/videos/channels.ts index a77543c92..9e7ec565d 100644 --- a/shared/extra-utils/videos/channels.ts +++ b/shared/extra-utils/videos/channels.ts | |||
@@ -1,13 +1,11 @@ | |||
1 | import { User } from '../../models/users/user.model' | ||
2 | import { ServerInfo } from '../server/servers' | 1 | import { ServerInfo } from '../server/servers' |
3 | import { getMyUserInformation } from '../users/users' | ||
4 | 2 | ||
5 | function setDefaultVideoChannel (servers: ServerInfo[]) { | 3 | function setDefaultVideoChannel (servers: ServerInfo[]) { |
6 | const tasks: Promise<any>[] = [] | 4 | const tasks: Promise<any>[] = [] |
7 | 5 | ||
8 | for (const server of servers) { | 6 | for (const server of servers) { |
9 | const p = getMyUserInformation(server.url, server.accessToken) | 7 | const p = server.usersCommand.getMyInfo() |
10 | .then(res => { server.videoChannel = (res.body as User).videoChannels[0] }) | 8 | .then(user => { server.videoChannel = user.videoChannels[0] }) |
11 | 9 | ||
12 | tasks.push(p) | 10 | tasks.push(p) |
13 | } | 11 | } |
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index 5dd71ce8b..5e20f8010 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts | |||
@@ -17,7 +17,7 @@ import { buildAbsoluteFixturePath, dateIsValid, testImage, wait, webtorrentAdd } | |||
17 | import { makeGetRequest, makePutBodyRequest, makeRawRequest, makeUploadRequest } from '../requests/requests' | 17 | import { makeGetRequest, makePutBodyRequest, makeRawRequest, makeUploadRequest } from '../requests/requests' |
18 | import { waitJobs } from '../server/jobs' | 18 | import { waitJobs } from '../server/jobs' |
19 | import { ServerInfo } from '../server/servers' | 19 | import { ServerInfo } from '../server/servers' |
20 | import { getMyUserInformation } from '../users/users' | 20 | import { xxxgetMyUserInformation } from '../users' |
21 | 21 | ||
22 | loadLanguages() | 22 | loadLanguages() |
23 | 23 | ||
@@ -339,7 +339,7 @@ async function uploadVideo ( | |||
339 | let defaultChannelId = '1' | 339 | let defaultChannelId = '1' |
340 | 340 | ||
341 | try { | 341 | try { |
342 | const res = await getMyUserInformation(url, accessToken) | 342 | const res = await xxxgetMyUserInformation(url, accessToken) |
343 | defaultChannelId = res.body.videoChannels[0].id | 343 | defaultChannelId = res.body.videoChannels[0].id |
344 | } catch (e) { /* empty */ } | 344 | } catch (e) { /* empty */ } |
345 | 345 | ||