Skip to content

Commit

Permalink
Merge pull request #97 from putyy/dev
Browse files Browse the repository at this point in the history
完善content type
  • Loading branch information
putyy authored Oct 29, 2024
2 parents fc06c29 + d7e34d9 commit 4d35c44
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
![](public/show.webp)

## 常见问题
m3u8预览和下载:
> [下载](https://m3u8-down.gowas.cn/) [预览](https://m3u8play.com/)
直播流 预览和录制:
> [使用obs进行预览和录制]( https://obsproject.com/)
下载慢、大视频下载失败(最新版本以内置aria2下载器)
> 推荐使用如下工具加速下载,视频号可以下载完成后再到对应视频操作项选择 “视频解密(视频号)” 按钮
>> [Neat Download Manager](https://www.neatdownloadmanager.com/index.php/en/)[Motrix](https://motrix.app/download)等软件进行下载
Expand Down Expand Up @@ -59,6 +65,9 @@ yarn run build --universal --mac

# 打包win
yarn run build --win

# 打包win
yarn run build --linux
```

## 实现&初衷
Expand Down
18 changes: 9 additions & 9 deletions electron/main/proxyServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ export async function startServer({win, upstreamProxy, setProxyErrorCallback = f
cert: fs.readFileSync(CONFIG.CERT_PUBLIC_PATH),
},
})
.listen(port, () => {
setProxy('127.0.0.1', port)
.then((res) => {
resolve()
})
.catch((err) => {
setProxyErrorCallback(err)
reject('setting proxy err: ' + err.toString())
});
.listen(port, async () => {
try {
await setProxy('127.0.0.1', port)
resolve()
} catch (err) {
console.error(err);
setProxyErrorCallback(err)
reject("请手动设置系统代理" + err.toString())
}
})
.on('error', err => {
setProxyErrorCallback(err)
Expand Down
1 change: 1 addition & 0 deletions electron/main/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ function typeSuffix(type: string) {
case "audio/webm":
case "audio/mp4":
case "audio/mp3":
case "audio/mp4;charset=UTF-8":
return ["audio", ".mp3"];
case "application/vnd.apple.mpegurl":
case "application/x-mpegURL":
Expand Down

0 comments on commit 4d35c44

Please sign in to comment.