mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-21 06:12:04 +00:00
fix: macOS not loading
This commit is contained in:
parent
183bdfe632
commit
fb6bdcab8a
3 changed files with 4 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Miru",
|
"name": "Miru",
|
||||||
"version": "4.4.5",
|
"version": "4.4.6",
|
||||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||||
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
||||||
"main": "build/main.js",
|
"main": "build/main.js",
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@ function createWindow () {
|
||||||
fn({ responseHeaders })
|
fn({ responseHeaders })
|
||||||
})
|
})
|
||||||
|
|
||||||
const torrentLoad = webtorrentWindow.loadURL(development ? 'http://localhost:5000/background.html' : path.join(__dirname, '/background.html'))
|
const torrentLoad = webtorrentWindow.loadURL(development ? 'http://localhost:5000/background.html' : `file://${path.join(__dirname, '/background.html')}`)
|
||||||
mainWindow.loadURL(development ? 'http://localhost:5000/app.html' : path.join(__dirname, '/app.html'))
|
mainWindow.loadURL(development ? 'http://localhost:5000/app.html' : `file://${path.join(__dirname, '/app.html')}`)
|
||||||
|
|
||||||
if (development) {
|
if (development) {
|
||||||
webtorrentWindow.webContents.openDevTools()
|
webtorrentWindow.webContents.openDevTools()
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export default class {
|
||||||
|
|
||||||
protocol.registerHttpProtocol('miru', (req, cb) => {
|
protocol.registerHttpProtocol('miru', (req, cb) => {
|
||||||
const token = req.url.slice(7)
|
const token = req.url.slice(7)
|
||||||
this.window.loadURL(development ? 'http://localhost:5000/app.html' + token : path.join(__dirname, '/app.html' + token))
|
this.window.loadURL(development ? 'http://localhost:5000/app.html' + token : `file://${path.join(__dirname, '/app.html')}${token}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
app.on('open-url', (event, url) => {
|
app.on('open-url', (event, url) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue