This commit is contained in:
IndieKKY
2024-10-04 00:07:11 +08:00
parent f50a2e3abd
commit abb97813d1
4 changed files with 8 additions and 9 deletions

View File

@@ -74,13 +74,12 @@ const useSubtitleService = () => {
useEffect(() => {
if (curInfo && !curFetched) {
sendInject(MESSAGE_TO_INJECT_GET_SUBTITLE, {info: curInfo}).then(data => {
const data_ = data.data
data_?.body?.forEach((item: TranscriptItem, idx: number) => {
data?.body?.forEach((item: TranscriptItem, idx: number) => {
item.idx = idx
})
// dispatch(setCurInfo(data.data.info))
dispatch(setCurFetched(true))
dispatch(setData(data_))
dispatch(setData(data))
console.log('subtitle', data)
})