This commit is contained in:
Rao 2025-03-02 21:03:36 +08:00
commit 8895845c26
5 changed files with 28 additions and 28 deletions

View File

@ -12,6 +12,7 @@ export class VideoProcessor extends BaseProcessor {
super();
}
async process(resource: Resource): Promise<Resource> {
console.log('process');
const { url } = resource;
const filepath = getUploadFilePath(url);
this.logger.log(
@ -114,6 +115,7 @@ export class VideoProcessor extends BaseProcessor {
filepath: string,
outputDir: string,
): Promise<string> {
console.log('outputDir', outputDir);
const m3u8Path = path.join(outputDir, 'index.m3u8');
this.logger.log(
`Generating M3U8 stream for video: ${filepath}, Output Dir: ${outputDir}`,

View File

@ -11,9 +11,6 @@ export class VisitService extends BaseService<Prisma.VisitDelegate> {
const { postId, lectureId, messageId } = args.data;
const visitorId = args.data?.visitorId || staff?.id;
let result;
console.log(args.data.type);
console.log(visitorId);
console.log(postId);
const existingVisit = await db.visit.findFirst({
where: {
type: args.data.type,
@ -21,10 +18,8 @@ export class VisitService extends BaseService<Prisma.VisitDelegate> {
OR: [{ postId }, { messageId }],
},
});
console.log('result', existingVisit);
if (!existingVisit) {
result = await super.create(args);
console.log('createdResult', result);
} else if (args.data.type === VisitType.READED) {
result = await super.update({
where: { id: existingVisit.id },

View File

@ -128,7 +128,7 @@ export class TusService implements OnModuleInit {
}
async handleTus(req: Request, res: Response) {
console.log(req)
// console.log(req)
return this.tusServer.handle(req, res);
}
}

View File

@ -100,7 +100,7 @@ server {
# 仅供内部使用
internal;
# 代理到认证服务
proxy_pass http://host.docker.internal:3000/auth/file;
proxy_pass http://host.docker.internal:3006/auth/file;
# 请求优化:不传递请求体
proxy_pass_request_body off;

View File

@ -1,24 +1,27 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script>
window.env = {
VITE_APP_SERVER_IP: "$VITE_APP_SERVER_IP",
VITE_APP_APP_NAME: "$VITE_APP_APP_NAME",
VITE_APP_VERSION: "$VITE_APP_VERSION",
VITE_APP_SERVER_IP: "192.168.139.239",
VITE_APP_SERVER_PORT: "3006",
VITE_APP_FILE_PORT: "8092",
VITE_APP_VERSION: "0.3.0",
VITE_APP_APP_NAME: "烽火慕课",
};
</script>
<title>fhmooc</title>
<script type="module" crossorigin src="/assets/index-C6LPy0O3.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CjRG4jbI.css">
<script
type="module"
crossorigin
src="/assets/index-C6LPy0O3.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CjRG4jbI.css" />
</head>
<body>
<div id="root"></div>
</body>
</html>