fix: macOS not loading

This commit is contained in:
ThaUnknown 2023-09-11 14:50:55 +02:00
parent 183bdfe632
commit fb6bdcab8a
3 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "Miru",
"version": "4.4.5",
"version": "4.4.6",
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
"description": "Stream anime torrents, real-time with no waiting for downloads.",
"main": "build/main.js",

View file

@ -51,8 +51,8 @@ function createWindow () {
fn({ responseHeaders })
})
const torrentLoad = webtorrentWindow.loadURL(development ? 'http://localhost:5000/background.html' : path.join(__dirname, '/background.html'))
mainWindow.loadURL(development ? 'http://localhost:5000/app.html' : path.join(__dirname, '/app.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' : `file://${path.join(__dirname, '/app.html')}`)
if (development) {
webtorrentWindow.webContents.openDevTools()

View file

@ -30,7 +30,7 @@ export default class {
protocol.registerHttpProtocol('miru', (req, cb) => {
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) => {