Skip to content

Commit

Permalink
Fix: edit movie
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyCreeper committed Nov 5, 2023
1 parent 955709f commit 12b5894
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
8 changes: 3 additions & 5 deletions src/types/Movie.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
export interface EditMovieInfo {
import type { BaseMovieInfo } from "@/proto/message";

export interface EditMovieInfo extends BaseMovieInfo {
id: string;
url: string;
name: string;
type: string;
headers: { [key: string]: string };
}

export interface BilibiliVideoInfos {
Expand Down
15 changes: 9 additions & 6 deletions src/views/Cinema.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,21 @@ let cMovieInfo = ref<EditMovieInfo>({
id: "",
url: "",
name: "",
live: false,
proxy: false,
rtmpSource: false,
type: "",
headers: {}
headers: {},
vendorInfo: undefined
});
// 打开编辑对话框
const editDialog = ref(false);
const openEditDialog = (item: MovieInfo) => {
cMovieInfo.value.id = item.id;
cMovieInfo.value.url = item.base!.url;
cMovieInfo.value.name = item.base!.name;
cMovieInfo.value.type = item.base!.type;
cMovieInfo.value.headers = item.base!.headers;
cMovieInfo.value = {
id: item.id,
...item.base
} as EditMovieInfo;
editDialog.value = true;
};
Expand Down

0 comments on commit 12b5894

Please sign in to comment.