diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-16 15:14:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-17 08:47:03 +0200 |
commit | 8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d (patch) | |
tree | eee3ef972943be629519c2dc97928878dbd2d732 /server/controllers | |
parent | fd6584844b070cfc283902aba26f2853473e83d1 (diff) | |
download | PeerTube-8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d.tar.gz PeerTube-8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d.tar.zst PeerTube-8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d.zip |
Refactor live manager
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/videos/index.ts | 2 | ||||
-rw-r--r-- | server/controllers/live.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 5fdb7d5bc..74b100e59 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import toInt from 'validator/lib/toInt' | 2 | import toInt from 'validator/lib/toInt' |
3 | import { doJSONRequest } from '@server/helpers/requests' | 3 | import { doJSONRequest } from '@server/helpers/requests' |
4 | import { LiveManager } from '@server/lib/live-manager' | 4 | import { LiveManager } from '@server/lib/live' |
5 | import { openapiOperationDoc } from '@server/middlewares/doc' | 5 | import { openapiOperationDoc } from '@server/middlewares/doc' |
6 | import { getServerActor } from '@server/models/application/application' | 6 | import { getServerActor } from '@server/models/application/application' |
7 | import { MVideoAccountLight } from '@server/types/models' | 7 | import { MVideoAccountLight } from '@server/types/models' |
diff --git a/server/controllers/live.ts b/server/controllers/live.ts index cfb4741b7..f2686fb23 100644 --- a/server/controllers/live.ts +++ b/server/controllers/live.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as cors from 'cors' | 1 | import * as cors from 'cors' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import { mapToJSON } from '@server/helpers/core-utils' | 3 | import { mapToJSON } from '@server/helpers/core-utils' |
4 | import { LiveManager } from '@server/lib/live-manager' | 4 | import { LiveSegmentShaStore } from '@server/lib/live' |
5 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' | 5 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' |
6 | 6 | ||
7 | const liveRouter = express.Router() | 7 | const liveRouter = express.Router() |
@@ -22,7 +22,7 @@ export { | |||
22 | function getSegmentsSha256 (req: express.Request, res: express.Response) { | 22 | function getSegmentsSha256 (req: express.Request, res: express.Response) { |
23 | const videoUUID = req.params.videoUUID | 23 | const videoUUID = req.params.videoUUID |
24 | 24 | ||
25 | const result = LiveManager.Instance.getSegmentsSha256(videoUUID) | 25 | const result = LiveSegmentShaStore.Instance.getSegmentsSha256(videoUUID) |
26 | 26 | ||
27 | if (!result) { | 27 | if (!result) { |
28 | return res.status(HttpStatusCode.NOT_FOUND_404).end() | 28 | return res.status(HttpStatusCode.NOT_FOUND_404).end() |