Skip to content

Commit b012825

Browse files
Merge branch 'next' into task/OV-377-create-preview-page
2 parents 89fd45d + 5d80b99 commit b012825

File tree

125 files changed

+3291
-218
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+3291
-218
lines changed

backend/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"migrate:dev:make": "node --loader ts-paths-esm-loader ../node_modules/knex/bin/cli.js migrate:make -x ts",
1717
"migrate:dev:down": "node --loader ts-paths-esm-loader ../node_modules/knex/bin/cli.js migrate:down",
1818
"migrate:dev:rollback": "node --loader ts-paths-esm-loader ../node_modules/knex/bin/cli.js migrate:rollback --all",
19+
"seed:make": "node --loader ts-paths-esm-loader ../node_modules/knex/bin/cli.js seed:make -x ts",
20+
"seed:run": "node --loader ts-paths-esm-loader ../node_modules/knex/bin/cli.js seed:run",
1921
"build": "tsc && tsc-alias",
2022
"start": "node ./src/index.js"
2123
},
@@ -53,6 +55,7 @@
5355
"pino": "9.3.2",
5456
"pino-pretty": "10.3.1",
5557
"shared": "*",
58+
"sharp": "0.33.5",
5659
"socket.io": "4.7.5",
5760
"swagger-jsdoc": "6.2.8",
5861
"tiktoken": "1.0.16"

backend/src/bundles/avatar-videos/services/script-processor.service.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,22 @@ class ScriptProcessor {
7373
voice: string;
7474
scene: Scene;
7575
}): void {
76-
if (text && this.currentAvatar) {
76+
if (!text || !this.currentAvatar) {
77+
return;
78+
}
79+
80+
const lastScene = this.result.at(-1);
81+
82+
if (
83+
lastScene &&
84+
lastScene.avatar.voice === voice &&
85+
lastScene.avatar.name === this.currentAvatar.name &&
86+
lastScene.avatar.style === this.currentAvatar.style &&
87+
JSON.stringify(lastScene.background) ===
88+
JSON.stringify(scene.background)
89+
) {
90+
lastScene.avatar.text += ' ' + text;
91+
} else {
7792
this.result.push({
7893
...scene,
7994
id: uuidv4(),

backend/src/bundles/public-video/public-videos.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { VideoModel } from '~/bundles/videos/video.model.js';
22
import { VideoRepository } from '~/bundles/videos/video.repository.js';
33
import { logger } from '~/common/logger/logger.js';
4+
import { imageService } from '~/common/services/services.js';
45

56
import { PublicVideoController } from './public-video.controller.js';
67
import { PublicVideoService } from './public-video.service.js';
78

8-
const videoRepository = new VideoRepository(VideoModel);
9+
const videoRepository = new VideoRepository(VideoModel, imageService);
910
const videoService = new PublicVideoService(videoRepository);
1011
const publicVideoController = new PublicVideoController(logger, videoService);
1112

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { templateErrorMessage } from './template-error-message.enum.js';
2+
export { templateApiPath } from './templates-api-path.enum.js';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const templateErrorMessage = {
2+
YOU_CAN_NOT_DELETE_THIS_TEMPLATE: 'You can not delete this template',
3+
YOU_CAN_NOT_UPDATE_THIS_TEMPLATE: 'You can not update this template',
4+
TEMPLATE_DOES_NOT_EXIST: 'Template does not exist',
5+
} as const;
6+
7+
export { templateErrorMessage };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const templateApiPath = {
2+
ROOT: '/',
3+
ID: '/:id',
4+
PUBLIC: '/public',
5+
USER: '/user',
6+
} as const;
7+
8+
export { templateApiPath };

0 commit comments

Comments
 (0)