Commit 0eac9b8a by haojie

编辑直播提交后,通知python删除视频

parent 4d24f912
...@@ -75,6 +75,7 @@ import { useRoute, useRouter } from 'vue-router'; ...@@ -75,6 +75,7 @@ import { useRoute, useRouter } from 'vue-router';
import routerConfig from '@/router/tool'; import routerConfig from '@/router/tool';
import { onUpdateLiveTask } from '@/service/Common'; import { onUpdateLiveTask } from '@/service/Common';
import { createLiveRouteKey } from '@/constants/token'; import { createLiveRouteKey } from '@/constants/token';
import { callPyjsInWindow } from '@/utils/pyqt';
import { useLiveInfoSubmit } from '@/hooks/useStoreCommit'; import { useLiveInfoSubmit } from '@/hooks/useStoreCommit';
const [commitInfo] = useLiveInfoSubmit(); const [commitInfo] = useLiveInfoSubmit();
...@@ -362,6 +363,12 @@ const onEditSave = async () => { ...@@ -362,6 +363,12 @@ const onEditSave = async () => {
loading.value = true; loading.value = true;
let res: any = await onUpdateLiveTask(route.query.id, filterFiled()); let res: any = await onUpdateLiveTask(route.query.id, filterFiled());
if (res) { if (res) {
if (route.query.type === 'edit') {
// 通知python删除对应的output.mp4
callPyjsInWindow('deleteOutputVideo', {
id: route.query.id,
});
}
// 回首页 // 回首页
backHome(); backHome();
} }
......
...@@ -129,6 +129,10 @@ const getList = async () => { ...@@ -129,6 +129,10 @@ const getList = async () => {
}; };
const onEdit = (item: any) => { const onEdit = (item: any) => {
if (item.is_live) {
show_message('直播中的禁止编辑');
return;
}
router.push({ router.push({
path: routerConfig.createLive.path, path: routerConfig.createLive.path,
name: routerConfig.createLive.name, name: routerConfig.createLive.name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment