Skip to content

Commit

Permalink
fix sniffer url is empty always open system player
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Apr 9, 2024
1 parent 7171e97 commit ca4f00d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/renderer/src/pages/Play.vue
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ const onlineUrl = ref(); // 解析接口+需解析的地址
const isSniff = ref(true); // 嗅探标识
const iframeRef = ref(); // iframe dom节点
const currentUrl = ref(); // 当前未解析前的url
const snifferTimer = ref();
const reverseOrder = ref(true); // true 正序 false 倒序
const onlinekey = new Date().getTime(); // 解决iframe不刷新问题
Expand Down Expand Up @@ -1116,7 +1115,7 @@ const initFilmPlayer = async (isFirst) => {
try {
MessagePlugin.info('嗅探资源中, 如10s没有结果请换源,咻咻咻!');
playerUrl = await sniffer(snifferType.type, snifferType.type === 'custom' ? `${snifferType.url}${config.value.url}` : config.value.url);
createPlayer(playerUrl);
if (playerUrl) createPlayer(playerUrl);
} catch (err) {
console.error(err);
};
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/pages/film/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ const gotoPlay = async (e) => {
try {
MessagePlugin.info('嗅探资源中, 如10s没有结果请换源,咻咻咻!');
playerUrl = await sniffer(snifferType.type, snifferType.type === 'custom' ? `${snifferType.url}${url}` : url);
callSysPlayer(playerUrl);
if (playerUrl) callSysPlayer(playerUrl);
} catch (err) {
console.error(err);
};
Expand Down

0 comments on commit ca4f00d

Please sign in to comment.