diff --git a/itunes-bridge.js b/itunes-bridge.js index 47033a1..13b7b5f 100644 --- a/itunes-bridge.js +++ b/itunes-bridge.js @@ -281,8 +281,8 @@ exports.isRunning = function() { function runScript(req, type, args, isJson) { if (process.platform === "darwin"){ - var iTunesCtrlScpt = path.join(__dirname, '/jxa/iTunesControl.js'); - var iTunesFetcherScpt = path.join(__dirname, '/jxa/iTunesFetcher.js'); + var iTunesCtrlScpt = path.join(__dirname, '/jxa/iTunesControl.js').replace('app.asar', 'app.asar.unpacked'); + var iTunesFetcherScpt = path.join(__dirname, '/jxa/iTunesFetcher.js').replace('app.asar', 'app.asar.unpacked'); switch(type){ case "fetch": { if(isJson) { @@ -302,8 +302,8 @@ function runScript(req, type, args, isJson) { } } } else if (process.platform === "win32") { - var iTunesCtrlScpt = path.join(__dirname, '/wscript/iTunesControl.js'); - var iTunesFetcherScpt = path.join(__dirname, '/wscript/iTunesFetcher.js'); + var iTunesCtrlScpt = path.join(__dirname, '/wscript/iTunesControl.js').replace('app.asar', 'app.asar.unpacked'); + var iTunesFetcherScpt = path.join(__dirname, '/wscript/iTunesFetcher.js').replace('app.asar', 'app.asar.unpacked'); switch(type){ case "fetch": { if(isJson) { diff --git a/package.json b/package.json index 12b07e7..96b745f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "itunes-bridge", - "version": "0.6.7", + "version": "0.6.8", "description": "A macOS and Windows NodeJS package to control and get informations from iTunes and macOS Music app through AppleScript", "main": "itunes-bridge.js", "repository": {