Skip to content

Commit

Permalink
fix change api not clear before
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed May 20, 2024
1 parent 54a647e commit 828025e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/src/pages/Analyze.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ const getVideoInfo = async (url: string, title: string) => {
return;
}
if (player.value) await clearWebview();
const api: any = _.find(analyzeConfig.value.data, { id: active.value.nav });
if (!api) {
MessagePlugin.error(t('pages.analyze.message.invalidApi'));
Expand All @@ -180,7 +182,6 @@ const getVideoInfo = async (url: string, title: string) => {
const playUrl = api.type === 1 ? await fetchJxJsonPlayUrlHelper(api.url, url) : `${api?.url}${url}`;
iframeUrl.value = playUrl || '';
player.value = await playerRef.value!.createPlayer(api.type === 0 ? 'iframe' : 'player', iframeUrl.value);
};
Expand Down

0 comments on commit 828025e

Please sign in to comment.